fixing an issue with validated the form