fix a problem in get_alert function