tweaked XML saving