fix attr_xx bug