Fix a bug which is checking a wrong peer address