use the correct end event for streams