test and fix issues with exportEntities()