nesting bug fixed