Fix error and remove the error class