fix boolean serialization/desserialization