fixed corner case bug in AlertManager