Fixed bugs with broad phase collision detection