Fixed bug for agent status refresh.