Trying to fix keydown bugs