Fix broken error reporting workaround