fix nested object issue