Fixed bug in alerts