properly deal with case where ROUTER_URL is a string, not a dict