Fixed minor bug in confusion matrix calculation