Ensure correct order during dataset export.