fixed bug where base classes were being affected when inherited