fixed agent check in case Slave_running key is not found