Fixing keyboard input