Fix add resource attributes only for external resources