Fix some issues with module timeout and crashing heuristics.