Fix logic program (add if on str)