Fixed another bug when creating a route