Back porting minlength option to < 1.0 branch.