fixed bug in assign_binary