Fixing partial refactoring of search model