route finding bug fix