Use setAttributes instead of addAttributes to replace any previously set attributes. Fixes a bug on iOS 6 when attributes are not set properly.