OutOfBoundException fix