Fix class inheritance