collision detection fix