Fix typo in call to len()

It seems like there's a typo in the calls to len().

This may apply to the other branches as well.