bug fix in getRouteSpecs (cherry picked from commit 552c5bc)