Revised the agent state transition during initialization.