fixed bug for date search