Fix minLength issue