Added an error message for bad range errors.