credits callculating fix