Correct length adjustment (close gh-47).