Fixed some possible key val(ue) bugs when looping through services, hosts, etc.