Fixed the inviting not working bug