fix to generate report and small fixes