Fix error class inheritance