modify some bug and add goagent init