fix subsetting and slicing