broken collision detection code