fixed invite bugs

closes #39