Regenerate metadata