Error reporting: fix mistakes