corrected line in error checking