Fix incorrect stack trace in logs