bugfix in writing automatic prefix for custom attributes