Fixing error in report writer