fix some bond valence calculation issues