fix XML creation bug where 'None' inserted