bugfix for reporting errors