Fixed an issue with converting contours to slices going out of bounds