Fixed addMembership issue (fixes #1)