fix class nesting