small change to validation to make error message more clear