Fix exit on close in the image search window