Fix a crash that could occur.