fixed NPE when getting datacenter for affinity group