Updated support for multiple windows