Fix reversed order of routes

Fixing #539