fix credit bug