Fix problem on get agents for networkdiscovery (wizzard). closes #1971