Fixes to report writer