Fixes key input issues