bug fix on get_slices