Update crash-detection algorithm