Better window workaround. Thanks @raynos