Fix some bugs.
Merge pull request #108 from christophemarois/groups

Fix some bugs.