Fixed a bug with IF'ing on XML element