This was after I spent 3 months (and many long and unpaid hours) saving the company $50K/year. When I was finished, I got reamed in a 2+ hour meeting for not working on the boss's pet projects (even after I explained to him many many times exactly what I was doing and why I couldn't work on his other projects). The problem is that I've seen too many people in upper-management that do things like this. It's why I decided to finally start my own company.
Some people are just not logical and make decisions based on pure emotions. I would have quit on the spot, but I wanted unemployment, so I intentionally made things difficult until I was laid off a month later.
My exit strategy worked.