Fix a crash condition