Improved the roundtrip calculations.