fixed a few errors in the class hierarchy