fix in report generation code