fix metric upload issues