fixed indexOfBoundException