fix class gen errors