[streaming] fix sliding window bugs.