fixed error class bug