Fixing an issue when reporting errors.