Fix serialization of true and false values