fix bug in parsing daemon config

quite a bad bug was left after refactoring variable names for proxyquery
test added