fix WMStatsWriter initilization
Merge pull request #5176 from ticoann/fix_wmstats_writer

fix WMStatsWriter initilization