Tesla Inc. recalled some 475,000 cars in the U.S. — nearly equivalent to its global deliveries last year — because of technical defects that may increase the risk of accidents.

The company plans to recall all Model 3 vehicles made between 2017 and 2020 — that’s as many as 356,309 cars. The cable harness for the rear-view camera may be damaged by opening and closing the trunk and prevent the image from displaying, it told the National Highway Traffic Safety Administration.

Tesla is also recalling as many as 119,009 Model S cars assembled from 2014 because of a faulty front-trunk latch that could cause the hood to open unexpectedly, according to a separate NHTSA statement. The company said it will fix both issues free of charge.

Tesla’s shares declined 1.5% in premarket trading. The stock has gained about 54% this year.

The electric carmaker has had a few run-ins with regulators. The NHTSA said earlier this month it’s reviewing a recent software update by Tesla that allows drivers to play video games on a dashboard screen while the vehicle is moving. NHTSA is also in the midst of an investigation into Tesla’s Autopilot system. The probe was launched by U.S. regulators after a dozen collisions at crash scenes involving first-responder vehicles.

Tesla earlier this year had to make a software fix to more than 285,000 cars in China — most of the vehicles it delivered there in recent years — to address a safety issue identified by the country’s regulator.