Fix typo in length var