Fixed the validation bug.