Fixes in xmlTemplate