A man who pleaded guilty to stealing from eight different establishments in Ulster County had his appeal heard.

David Mahoney pleaded guilty to two counts of burglary following a 2013 crime spree. The Ulster County District Attorney’s Office says during a 10-day period, Mahoney burglarized eight separate commercial establishments and public buildings.

Mahoney pleaded guilty with the understanding he would be sentenced to two to seven years in prison.

However, after reviewing defendant’s unfavorable pre-sentence report, the court made clear it would not impose the agreed upon sentence, officials say.

The District Attorney’s Office reports Mahoney was told he was going to be sentenced to consecutive prison terms, the first was two to seven years and the second two to six years. Prosecutors say Mahoney was given the chance to withdraw his guilty plea, but he declined. He was then sentenced to the consecutive terms.

On appeal, Mahoney said that the enhanced sentence was harsh and excessive.

On Thursday, his appeal was rejected by the Appellate Division, Third Department.