Some small improvements to the crash handler