Fixing bug when determining credits.