fix issue in search reduce