fix silly typo in set_window which caused a bug