collision detection fixed