Fix minor bug in length comparison.