Odd flight path

the Oct 11-12 AAL98 flight from Chicago to London doubled back several times before hitting the Quebec border. Anyone have any suggestions what was going on?

flightaware.com/live/flight/AAL9 … /KORD/EGLL

Looks like bad position data, I doubt the flight did that. Could be that NY center issued a transponder code that was already assigned to 98 by Toronto and for a short time the ATC computer confused the two. or not.