fix crash in alert()