RouteHelper fix when query is not defined