fix object nesting issue