Corrected a problem with error testing