Corrected length definition in _slice