fixed centos agent function