Small improvement to Export fuction.