Fix range for slice