fix nesting expand issues