Correcting variable declaration from bye to int

the original code has a bug