fixed collision detection!!!