fixing validate