fix error in generate report.