fix bad scope in generated metadata