corrected variable names in agent config and fixed error in web db template