Fix an edge case in the generator that was causes the route specs to fail