fixes validation bug