Fix reference validate bug