Patch to fix duplicate window update