Fixed an issue where space key are not recognized