fixed alert firing multiple times bug