fix keypress listener