Fix the tricky bug of expanding sliding window AGAIN.