fixed where minimum length wasnt being used