some more window/context cleanup