Fix potential crash.