Bugfix: need to export those shell variables from the function.