QENG-1224 Change local variable in loop to h instead of host