fix keyword search function