........S. [ZBX-7901] fixed uninitialised variable reload_first; some code improvements