Fix inconsistent handling of bit variables