Fixed undefined variable (minlen)