fixed bug in conditionals of set_str_algo