saving and updating xml now works properly