Traversal serialization fix and added tests