Date search bug fix