deal with the errors