Fixes GetCreditAmount to fail on nonpositive numbers