adjust the error checking