fixed custom headers in metadata refresh