Fixes stack trace logging