Fix GetMetadata method