Fix collision detection.