Fix warning: lenmax isn't used any more.