Patch to solve bugs with default required type and min/max size