Backported fixed search manager from master.