Update to retrieve nested objects correctly