Fixed keydown bug