Fix length undefined error
Merge pull request #1 from sirlancelot/patch-1

Fix length undefined error