fix for saving empty xmlobj