fixed a nesting error