Added support for resizing the window