Fix bug when inputing characters

...o a bug in comparison of ASCII code to inputed character.