Fixed an issue with waiting too long to go to next path.