Fixed base team code

Now made it compatible with all team types