Corrected byte to int.

the original code has a bug