minor fix to error reporting