binary serialization improvements