Fix bug where id was captured by reference, not value.
Merge pull request #5 from edmodo/fix-id-bug

Fix bug where id was captured by reference, not value.