fix: select the item instead of data in forEach at non-existing index for sequence
emit event 'end' after closing