Fix possible crash.