Fixed calculating of left credit