GTS Glitch

I tried to put my Pokemon into the GTS for another Pokemon and my game just crashed It says:

Script ‘GTS_Deuk’s script no stealerino’ line 359: NameError occurred.

undefined local variable or method `team_index’ for GTSHandler:Class

It would be great if anyone knows how to stop this. Thanks!

GTS is bugged, dont put pokemons in there