Code

Merge the attributes fix in from maint-1.6.6 branch