bugfix window handling