Comment 2 for bug 1013869

The second patch also fixes the companion bug: a smart search is not saved if gtg is xkilled. Probably there is a more elegant solution, but it works.