Fix a potential crash.