Made collision detection better
Merge pull request #27 from shiyingzheng/master

Made collision detection better