fixed bug with stacktrace generation