Fixed bug where key kept on being marked as pressed. Fixed bug with flipped sub-images being wrong.