Fixing by-attribute generation