Fixed Collision Detection Bug