moved the block length mismatch code to another part of the loop.