bug fixes with key presses