Solved the collision bug