Fixing the collision bug