fix for adding removing xlink elements