Fix register() with specified collection name
Merge pull request #1 from aragaer/master

register() fails if collection name is specified