Added simple fail-safe algorithm when leaving track