Fix a bug for page ranking