Fix a rare crash.