Fix possible issues with populating invite_state