small correction in error message handling