fixed spacebar bug