Fix bug in evaluating performance