bug fixes to portfolio export