Fix to service gateway to support resources with internal objects