fix bug in precision and recall