fix validate bug