fix a little bug. this build can generate agent successfully now