Various xml export issues fixed