Fix lag when pressing key