After a bank forgives your mortgage, the problems may not be over.

The IRS says that those whose debts were forgiven may have to pay taxes on the amount pardoned, according to the Huffington Post. Some of the reduced or canceled debt has to be treated as income, but not all.

There are federal programs in place to help avoid this tax from adding insult to injury.

The Mortgage Forgiveness Debt Relief Act in 2007 provides guidelines as to what canceled debt is taxable.

Forgiven debt on rental and business properties is not protected by the act. Also, the debt must have been forgiven between 2007 and 2012 and protection is limited to $2 million.

Debts that were forgiven through bankruptcy are also included in the Act, as well as second mortgages and funds used to refinance a principal residence.

Taxpayers are required to declare any canceled debt on their tax returns by attaching a Form 982, Reduction of Tax Attributes Due to Discharge of Indebtedness, to the tax return.

TWITTER: @joeyferguson