bugfix: flags of peer is incorrect