Forgot to remove cur_class = char_classes[class_index].