Fix bug that makes search impossible