Fixed Scoring Bug

Corrected a bug in the function that scores the AIML categories returned
from the DB that caused some categories to be incorrectly ranked.