Fix credit calculations