sync of old 1.6.4 branch before switching master to 1.7