fix #47 and #48
code style
Merge pull request #49 from tkruse/fix_export

Fix export function #47 and #48