fix bug for exceeding bounary in function itoa()