Polls are open in the first in the nation primary in New Hampshire, but Massachusetts residents should also get thinking about their own primary.

The Bay State's presidential primaries are on March 1, and Wednesday is the last day to register to cast a ballot.

It's also the last day to change your party registration before the primary, which is information that's likely useful to thousands of voters in Massachusetts who state officials say may have registered incorrectly.

Secretary of State William Galvin, a Democrat, said he is concerned that as many as 20,000 people who meant to register as "unenrolled" instead mistakenly registered for the United Independent Party, a party established by Evan Falchuk, an attorney who ran for governor of Massachusetts in 2014.

If you're registered as an unenrolled voter, you can choose which party ballot to pull on primary day. But if you're registered with a specific party, you can only vote in that party's primary. There is no candidate running for president from the United Independent Party.

"Unfortunately, voters who may not be that sophisticated, when they see the word 'independent,' think they're independent, they can do whatever they want," Galvin told WBUR's Newscast Unit. "Which, if they were a true unenrolled independent, they could, but not a member of [Falchuk's] party. So we're trying to fix it as best as we can."

Galvin said officials have now placed a warning on the state's voter registration website to tell voters that registering with the United Independent Party will not allow them to vote in the March 1 primaries. His office has also sent letters to those they suspected may have registered incorrectly. Some residents who erred on their registrations have since switched to become actual unenrolled voters, Galvin said.

In a Facebook post Monday addressing a WGBH story on Galvin's concerns, Falchuk said: "We've been very co-operative with the Secretary of State's office in making sure members of the United Independent Party know they need to un-enroll if they want to vote in the Democratic or Republican primaries on March 1." Falchuk said his party has sent out "thousands of emails and numerous social media posts, talked about it in the press, at voter registration drives and in other public venues."

A number of the United Independent Party's registered members have reached out to party leaders to say they are only temporarily leaving the party simply to vote in the March 1 primary, but plan to re-enroll in the UIP before the general election, Regan Cleminson, UIP's deputy director of communications, said Wednesday.

Added Galvin to WBUR's Newscast Unit: "We've rectified quite a bit. We're doing the best we can. We put as many warnings out, we're sending out email blasts, on our Twitter account we're sending material. We're doing everything we can to get the word out."

Voters can register or change their party affiliation at any local election office or Registry of Motor Vehicles location. Most voters can also register online. For details on how to register to vote, here's the state's guide.