fix str search condition bug