Small changes to error reporting