Continuity mistake: James and Edward are on the mainline at first, but then they overrun the platform at Dryaw station, which is on Thomas' branch line.
Other mistake: The narrator says that the fence was mended, but there is no fence and there never was.
Answer: Breakdown trains help the engines back on track.