fixed incorrect keypresses getting ignored