fixed some glitches of input