Fix node serialization