Incorporate Paul's stack trace logging fix.