Fix for possible crash.