Fix stack trace from exported function

fixes #15