New Jersey lawmakers, called back to Trenton for a special session during their summer recess, passed a bill Tuesday to fix a mistake they made last year when creating a permanent list of voters to receive mail-in ballots.

That bill included voters who had received mail-in ballots in the 2016 general election, but its wording left out 172,000 voters who had requested absentee ballots in 2017 and 2018 before the law took effect.

Last week, lawmakers scrambled to respond as word of the error spread. They returned to Trenton this week to vote on the new bill. The Senate passed the bill 22-10 along party lines Monday, with eight lawmakers not voting. The Assembly passed it by 44-14 Tuesday morning.

No Republicans voted for the bill in the Senate, and an attempt to amend the bill was quickly shut down by Democrats. The roll call for Tuesday’s Assembly vote was not immediately available.

Gov. Phil Murphy, a Democrat, plans on signing the bill, a spokesperson said Tuesday.

The legislation was introduced by Senate President Stephen Sweeney (D., Gloucester). In a statement Monday, he said the bill was intended to make voting more accessible and increase participation in elections.

“The greater the civic engagement, the healthier the democracy,” he said in the statement. “This isn’t political, it’s fundamental, and we need New Jersey to have the strongest democracy possible.”

New Jersey allows all voters to request a mail-in ballot without having to provide a reason. If a voter wanted to vote by mail in future elections, there used to be two options: Receive a mail-in ballot for all elections in a single year, or one for every general election moving forward.

Last year’s legislation changed that by creating a single list, allowing voters to opt in to receive absentee ballots for all future elections. Voters who received mail-in ballots in the 2016 general election were automatically added to the list under the law, but the 2017 and 2018 absentee voters were not.

Most of the affected voters were already back on the list. County elections officials reached out to them, and as of late last week about 149,000 of the 172,000 affected voters had responded. The new bill would automatically place the remaining voters onto the permanent list.