fix issue restore text only if no search string is entered