fix list comprehension bug in assign_binary