fixed maxItems/minItems bug