fix(code): Correct report generation (closes #4486)