bug fix for alert problem