Fixed a bug where names with illegal xml chars would not be picked up.