fixing a trail bug