nesting errors fix