Updated definition of length in _slice