Moody’s Investors Service has taken a slightly rosier view of Maine’s finances.

The rating service left Maine’s overall debt rating at Aa2, one step down from its top ranking, but revised its outlook from negative to stable.

In its report, Moody’s said the revised outlook reflects a stable revenue picture, progress toward structural balance and actions that have been taken to get a better handle on pension and retiree health costs.

But the rating service also warned that Maine’s economic recovery is lagging behind the nation as a whole and weak demographic trends, such as an aging population and limited in-migration, will hinder the state’s growth in the long term.

The immediate impact might be to lower the state’s borrowing costs when it issues $115 million in bonds next week.

Gov. Paul LePage hailed the revision, saying in a statement Wednesday that it shows “Republican reforms are working for Maine.”

While the revision is good news for the state, Moody’s rating report contains plenty of red flags.

For instance, the service said that Maine’s rating of Aa2, while near the top, is still lower than most states.

A conservative approach to debt, reforms to the state pension plan and “modestly improving” revenue are positives for the state, Moody’s said.

But Moody’s said Maine continues to struggle with a large pension liability, limited financial flexibility, weak liquidity in the General Fund and the poor long-term demographic trends.