Fixed an error in the query for ExportImportSelectedEntities