readBytes error fixed