IndexOutOfBound corrected on windows systems

IndexOutOfBound corrected on windows systems