revert part of f4f3d45d6ac87ec8484e6705e499e75f9783e801, change UnManagedStruct to Ptr