Fix issue with Layered Window