Error reporting bug fix