Fix alert bug where only one alert would be shown.