fix class registration
Merge pull request #134 from remicollet/issue-177

fix class registration