bugfixes for xml import