By adding more than 200 computer modems, retraining election judges and revamping other election procedures, Montgomery County managed to open its polls on time and post most election returns early last night, improving on the county's disastrous primary election debut in September of new touch-screen computerized voting machines.

Montgomery elections officials said they were generally pleased by the performance of election judges running the machines, and that eight weeks of frantic work, extra training and overtime had paid off. Yesterday was marred only by a technical glitch on some ballots that affected 30 precincts and by long lines at several polling stations.

By 11 p.m. with all but a handful of the 237 precincts reporting, election officials had all but met County Executive Douglas M. Duncan's goal of having the election returns complete by the 11 p.m. television news. It was a far cry from primary night, when officials first posted erroneous results on the Web site, and then labored until 2 a.m. before getting actual returns out.

"We had that one programming glitch, but that didn't affect anybody's ability to vote," Duncan said. He blamed the long lines at some polling places on a shortage of voting machines, saying that the county had repeatedly asked the state for more machines, and their requests went unheeded.

At the Holy Cross Resource Center in Silver Spring -- the tardiest precinct to report during the primary -- a trained volunteer was on hand to cumulate the final vote count and send results via computer to the Board of Elections -- a new procedure for the county.

It was touch and go for a while, but just after 9 p.m. the data finally began sending. "Yes, we're good to go," said Lillian Davis-Brown, "because I was sweatin' it."

During the primary, Prince George's County attributed its ability to post returns more quickly than Montgomery to its use of computer hookups to send information. Last night, Montgomery had set up 32 modem lines to take in returns from 237 precincts.

As in the primary, voters in the three other counties using the touch-screen systems -- Prince George's, Dorchester and Allegany -- reported a handful of problems but generally smooth going, despite the heavy voter turnout attributed to tight races around the region.

In Montgomery, however, a programming error caused the word "Democratic" to appear atop every ballot at 30 polling stations -- confusing some voters and angering Republicans -- while voters waited for more than an hour in some areas of Chevy Chase, Bethesda and at Leisure World, the retirement community in Silver Spring.

Board of Elections officials sent six additional voting machines to Leisure World at staggered intervals throughout the day, but they said there were no extra machines to send to other crowded precincts in the county. The state provided Montgomery with a total of 2,500 voting machines, far fewer than the 5,000 punch-card machines county residents used in previous years. By late afternoon, lines at Leisure World still were delaying voting by nearly an hour.

"It's a mob in there," said one woman, who declared herself exhausted by the ordeal.

Although they said the long lines were taxing, voters for the most part responded with enthusiasm to the new electronic ballots, saying they were easy to use.

"It was wonderful, and I'm not even computer literate," said Winnie Soltz, 62, a Gaithersburg substitute teacher voting at Gaithersburg High School.

Republicans were worried about the programming error at the 30 precincts in District 19 that put "Democratic" in the header of the ballots.

Lisa Solomon, a computer consultant from Silver Spring, said she was the first person in line at Kemp Mill Elementary School yesterday morning to vote. Solomon, a Republican, inserted her voting card into the machine and the word "Democratic" appeared on the screen's instruction page.

She told the election judges about the problem, and she said they seemed confused by it. Other voters began noticing the header, too.

"The word 'Democratic' inadvertently programmed on the header," said Marjorie Roher, an administrative specialist for the Board of Elections. "It does not affect in any way, shape or form your vote."

Prince George's elections administrator Robin Downs said that two precincts in the county had a problem similar to Montgomery's ballot.

At Middleton Valley Elementary School in Temple Hills, voters saw "Republican" on the first page of their ballot, and at Bond Mill Elementary in Laurel, the ballots were labeled "Democratic."

Downs said that their system's technicians were able to delete the words from the ballots and fix the problem shortly after the polls opened.

Solomon said she was not convinced her vote would register.

The General Assembly decided to overhaul Maryland's voting system in response to the Florida ballot count that delayed the results of the 2000 presidential election for weeks. State budget officials decided to replace outdated systems in Montgomery, Prince George's, Allegany and Dorchester counties for this year's elections and to install computerized voting machines statewide by 2006.

The four counties and the state split the $15 million cost of the new AccuVote-TS system, manufactured by Global/Diebold Election Systems in Ohio.

Montgomery also was waiting to see how well it fared meeting new federal mandates for non-English-speaking voters, which require that bilingual ballots, signs and registration forms be supplied if a jurisdiction has significant numbers of voting-age citizens who do not speak English well.

Lori Morgan votes at Tulip Grove Elementary School in Bowie as son Tony, 5, watches.