fixed __getslice__ for dart backend.