Er bug fix

- fix a memory leak bug in entity relation task
- fix a bug in multi-class task (total # classifiers is incorrect)