Fix for time arrayOutOfBounds error