Fix export controller and its tests (issues caused by refactoring)