fix handling of binary variables