Fixed crash when attributedStrings is empty.