Merge "fix a bug in crash handling"