fix class definitions so they are valid