Rewrite fix of WarpToWindow.