Fixed problem where keyboard dismissed after every keystroke