search encode fix