fix a validate bug