improved tests for select_window