Fixed potential bug in generating package.xml