Fixed OutOfBounds error