Key bug fix to SlidingWindow when step size > 1