fixes validation method