Making the validation work on all occasions