Fix serialization of bit_vector