close window before ItemSearchAndPick()