fixing keypress timer