fix some agent properties to avoid agent fail after instance created.