There was a bug (I'm not sure if it's been fixed or not) where if you hired an NPC that was in a stack with other NPCs, it would only tell you the cost of one of them, but if you said yes to that, it would hire all of them and charge you for all of them, possibly sending your treasury negative. Could that have been your problem?