Fix a problem that may causes a crash.