[3.8] Fix serialization