Fix attributes writer