fixed dslice() for 0 and 1 key cases