Fixed one more issue and improved error handling when working with reports.