Unexpected expenses and shortfalls — $3.8 million in police expenses, $4 million in unpaid tax credits, a $14.4 million gap from inactive speed cameras — left Baltimore officials scrambling in recent months to patch holes in the budget, the city's fiscal chief said Tuesday.

Budget Director Andrew Kleine detailed the fixes in the $2.4 billion spending plan at a quarterly briefing before City Council members. He said he now expects a $4.5 million surplus by the end of the fiscal year in June.

Before the session, he said city government was "in a sound fiscal position right now."

"There are a lot of things that we would like to be doing," Kleine said. "We need to invest more in infrastructure. There have been a lot of services we've had to cut in the last several years. [But] given the city's economic situation, I think our fundamentals are strong."

Only four council members attended the hearing of the council's Budget and Appropriations Committee. No public testimony was taken.

Kleine said Baltimore made it through the recession and lingering economic slump with greater reserves than five years ago, lower property taxes, a $1.1 billion school construction plan and a 10-year strategy to close the city's $750 million in structural deficit.

"The city is moving in the right direction, but still has a long way to go toward fiscal sustainability," he said.

Baltimore ended the last fiscal year with a $42.7 million surplus. That extra money, which came primarily from greater-than-expected revenue from income taxes, more aggressive parking ticketing and the recovery of the housing market, was more than twice the surplus of the previous year — even with the loss in fines from the lucrative red-light and speed camera program.

The money will be returned to the general fund balance, Kleine said. He said the city could use the fund balance to clear asbestos from city buildings, repay part of a federal stimulus grant the city spent improperly on services for the homeless, fund school crossing guards and cover the loss of revenue from idled traffic cameras.

The projected loss of $14.4 million in fines from the speed camera program, which has been suspended since April, has been the greatest hit to the current budget. The $4 million the city is projected to save in payments to Brekford Corp, the company contracted to run the cameras, will cover only a portion of the loss.

"I don't know when the cameras will be back on," Kleine said. "If they continue to be off in 2015, as they very well might, this would be a way to bridge to when they are back on without having to make service cuts. We still see this as a temporary situation."

The city shut down the speed camera program after an investigation by The Baltimore Sun showed that they were generating fines improperly. The administration is evaluating its contract with Brekford.

Also built into the budget is the money for homeowners who received less than they were owed in tax credits for historic properties over the last three years.

Kleine said as many as 897 properties are potentially eligible, but refunds will be determined on a case-by-case basis. To receive a refund, homeowners will have to contact the city's revenue collections office.

Councilman Carl Stokes said he supports the administration's decision to set aside money for refunds.

"I don't see how you can say it's a bad thing if people are due those refunds," he said. "It's not their fault."

But Stokes, who chairs the council's taxation committee, said he isn't confident that city officials have a firm grasp on whether property owners paid too much or too little.

At a hearing on the tax credit errors this month, Stokes listened as officials from the city Finance Department and the state Department of Assessments and Taxation blamed each other for mistakes. Though it was lively, he said, the discussion did not clarify the cause of the errors.

Stokes is pressing for an audit by Comptroller Joan M. Pratt, who has said her office has requested records from the Rawlings-Blake administration.

Problems with the historic credit emerged in the summer of 2012, when a Baltimore Sun investigation found that chronic calculation errors by the state assessments agency had resulted in excessive tax breaks, costing the city more than $1.5 million in potential revenue over a period of years.