Fixes for xml tool to correct vertex count compilling