Using the mate name instead of id
Actually set the flags...