.......PS. [ZBX-8476] fixed (1) and (4): ns is not assigned -1 anymore, refactored code with old_type