make refresh-goagent more robust