migrate search bug fix