Prof. mod: add export test, fix bugs found due to test