workaround unsafeWindow until bug 1005255 is fixed