Fix start agent error bug.

Signed-off-by: Ji You <jiyou09@gmail.com>