Fixed nesting problem