...G...... [ZBXNEXT-497] minor code rearrangement