repaired the agent forking system