Bug fixes

* Fixed a error when calling preventDefault()
* Fixed a bug which could display the ball half off the screen