Fix crash properly