Fixed bugs with trail collisions