Bug fix for createRoute