The reversal came in the wake of criticism by elected leaders and travelers.