fix #2316: small ties

This replaces previous PR; rebased and with tests fixed