fix crash when pressing enter after select mode with no selection