fix bug in nagios alerts handler