fixed bug in agent config generation