Fixing exception stack trace construction.