Corrected byte to int.

The code has a bug and I fixed it