If you are playing other species that you gain money then pay upkeep you are playing wrong.
This is completely wrong and people get this rule wrong a lot. You actually gain your money, then pay up keep, then if you are not bankrupt, you gain science and materials. Page 24 direct from the game manual "Collect your income and then pay your civilization upkeep cost. After paying the civilization upkeep cost, collect the science and materials production."