CHICAGO — Early voting in Illinois got off to a rocky start Monday, as votes being cast for Republican candidates were transformed into votes for Democrats.

Republican state representative candidate Jim Moynihan went to vote Monday at the Schaumburg Public Library.

“I tried to cast a vote for myself and instead it cast the vote for my opponent,” Moynihan said. “You could imagine my surprise as the same thing happened with a number of races when I tried to vote for a Republican and the machine registered a vote for a Democrat.”

The conservative website Illinois Review reported that “While using a touch screen voting machine in Schaumburg, Moynihan voted for several races on the ballot, only to find that whenever he voted for a Republican candidate, the machine registered the vote for a Democrat in the same race. He notified the election judge at his polling place and demonstrated that it continued to cast a vote for the opposing candidate’s party. Moynihan was eventually allowed to vote for Republican candidates, including his own race.

Moynihan offered this gracious lesson to his followers on Twitter: “Be careful when you vote in Illinois. Make sure you take the time to check your votes before submitting.”

Cook County Board of Elections Deputy Communications Director Jim Scalzitti, told Illinois Watchdog, the machine was taken out of service and tested.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

“This was a calibration error of the touch-screen on the machine,” Scalzitti said. “When Mr. Moynihan used the touch-screen, it improperly assigned his votes due to improper calibration.”

Click for more from Watchdog.org