Fixes team invite to work correctly with multiple ids