Fixed collision detection error