During the last two weeks of tax season, TaxMama got some heartbreaking requests for information from people who had done things in 2011 that couldn’t be fixed when filing taxes.

Perhaps these are things you’re also thinking of doing right now? Let’s learn from their mistakes.

First-time homebuyer credit errors

The first-time homebuyer credit had tight strings attached. The home for which you received the credit must then be your personal residence for 36 months.

People have said they moved out, or rented out the home, or were evicted. Those things bring about a required repayment to the IRS. There’s no reduction for living in the home for 22 months instead of 36 months.

Only one person called me before selling her home to find out the restrictions on this credit. She opted to stay for several more months instead of taking the hit when filing taxes.

How can you avoid the repayment? The credit must be repaid up to the amount of the profit. Selling at a loss, or being evicted, might mean either no repayment or repaying a smaller amount. Beware—if your loan(s) were for more than the price of the house, you may find you owe more of that credit than you expected.

If you simply cannot afford the house, consider remaining in it but renting out rooms. There’s no law to prevent you from renting out part of your house.

Drawing money from a 401(k) or retirement plan

You probably know that you can draw money from your IRA for things like a down payment on a home or to cover medical insurance when you are unemployed.

However, these situations only enable you to avoid early withdrawal penalties. The taxes are still due.

Worse—those penalty waivers only work for IRAs, not for funds drawn from a job-related retirement plan, like a 401(k) or 457 plan. It’s quite a shock getting hit with these penalties when filing taxes.

But if you need money badly, what are your options to avoid paying penalties?

1) While you are still employed, borrow the money from your retirement plan, if possible. You can borrow 50 percent of the account balance, up to $50,000. You pay no taxes, and you repay yourself over several years.

2) Roll the money from your retirement plan over into an IRA first. You’ll avoid the early withdrawal penalties for certain uses of the funds.

3) Get a loan. Credit card loans are cheaper than paying the highest federal and state tax bracket plus penalties—usually close to 45 percent by the time you’re done.

Getting your spouse’s retirement funds in a divorce

A special provision in the Tax Code allows the penalties and taxes to be waived when the court orders a distribution from one spouse’s retirement plan to be paid to the ex-spouse: a QDRO, or qualified domestic relations order.

But taking the money and cashing it all out or putting into your bank account is a mistake. While you’ll avoid the 10 percent early withdrawal penalty, you’ll pay taxes on money you don’t really need presently.

The solution: Split the distribution into two funds. Draw the money you absolutely need for current expenses. Put the rest into an IRA you open specifically for this purpose.

If the account has a lot of money in it, arrange to draw out the funds like an annuity using a special formula. That gives you a budget and avoids the early withdrawal penalties.

Cancellation of debt

Yippee! Your credit card company cancelled your balance. Your mortgage was modified. You’ve cut your debt by a fortune.

Oops! That’s all taxable income. Read this blog post to learn how to avoid paying taxes.

Bottom line when filing taxes

Before taking any major financial steps, please, please, please get advice from a competent tax professional, an estate attorney, or whoever is the right person for the job.

Eva Rosenberg, EA is the publisher of TaxMama.com , where your tax questions are answered. Eva is the author of several books and ebooks, including the new edition of Small Business Taxes Made Easy. Eva teaches a tax pro course at IRSExams.com and tax courses you might enjoy at http://www.cpelink.com/teamtaxmama.