bug fix: if the route pattern has variables, it isn't redirected correctly.