Capture better stack traces
Fix global leak