more serialization improvements