Fixed some issues in the windowing effect.