Fixed invite test failure and added a test for #155.
Merge pull request #157 from yeukhon/master

Fixed invite test failure and added a test for #155.