Fixed collision detection