bugfix for window