Fix range of array.slice()