fixes math error on computing spacing and outOfBoundException on selTournament