fixed the collision bug