Fixing the inheritance for some classes