more correct serialization of paths