changed error class to correct one