fix cross-platform handling; correctly pin METADATA