Fixed a problem with the window