Scoped the len variable.  Fixes #39.