fix bug in bonding