Fixed agent initialization