........S. [ZBXNEXT-2033] fixed a bit of style and some minor bugs during code review