fixed updating agent status