Fix improper nesting