bug in self.window