Fixed some of the validation function