some error reporting fixups