Fixed bug with losing focus before key release