Fixed the problems in the collisionhandler class