Tesla is recalling more than two million vehicles across its model lineup to fix a defective system that’s supposed to ensure drivers are paying attention when they use Autopilot.

U.S. safety regulators announced yesterday that the company will send out a software update to fix the problem.

The recall comes after a two-year investigation by the National Highway Traffic Safety Administration into a series of crashes that happened while the Autopilot partially automated driving system was in use.

The recall covers nearly all of the vehicles Tesla sold in the U.S. and includes models Y, S, 3 and X produced between October of 2012, and December 7 of this year.

Investigations show the cars safety regulations and systems were not followed by the drivers who had accidents, contrary to their instructions when getting the vehicles.

-Tony Lee