fix boundary issue of generator windowed