Fixed issue with attribute encoding.