credits to Ilan for the xml fix