fixed error when repairing ascii corrpted files with last packet mismatch