Fix substring search.