Enabled support for changing teams (Fixed)

Fixed previous errors with the code.