Correcting use of display in stack trace generation