X value and catch space keypress bug fixed