fix errors in error reporting

latest commit f5c71f437c
Zbikowski authored