Saves and restores team ID