Fix the crash that the previous commit half-fixed.