Fix stack trace printing.