What factor forced the French to retreat to Metz?