Improved stack tracing