fixed Collision detection