Improved the backtrace printing code.