Route finding bug fix