Removed the length argument of endCollection, added the correct length to beginCollection.
Merge pull request #79 from LBliss/issue/68

Fix #68 provide length of collections always at the beginning