fixed xml handling