fix bug when getting id of object from response that is scoped in response