Fix serialization of node with tags