Fixing bugs in keypad numeric input