fixed a bug in proba_pair