Fix issue 538
Merge pull request #539 from sescandell/fix-issue_538

Fix issue 538
Update collection.js