Why does my tax owed go up when I add in rental income expenses such as real estate tax?

I entered about 20K in rental income.  When I add in the expenses such as real estate tax and insurance, my tax owed goes up.  When I remove the expenses the tax owed goes down.  Doesn't make sense to me.  The expenses are supposed to offset the income, hence less tax.