Disable entities in XML importer and fix migration query