Fix to make metadata run
Flatten all headers