agent fixes

- guard against dns server list being nil
- fixed uninitialized variable