collision detection fixes