Fixed  assigment in case search-term doesn't exist