Fixed bad inheritance hierarchy