fix nesting error