Umproved handling of windows