fix a bug in client side validations