Attempted fix for NoneType error on invite