fix a bug in exemplar train and test