........S. [ZBX-8873] improved algorythm to reduce probability of a genaration of the wrong events