fixed bug in xmlgen