   w.updateSettings = (needContentReload=true) ->
     meta = {}
     angular.forEach(w.settings, (setting) ->
-      extendDeep(meta,setting.toMetadata())
+      angular.merge meta ,setting.toMetadata()
     )
     pushMetadata(meta, needContentReload) if !_.isEmpty(meta)
     return true

  # Retrieve the widget content from Impac! and initialize the widget from it.
  w.loadContent = (refreshCache=false) ->
    w.isLoading = true
    DhbAnalyticsSvc.widgets.show(w, refreshCache).then(
      (success) ->
        updatedWidget = success.data
        updatedWidget.content ||= {}

    return if _.isEmpty(newMetadata)
    data = { metadata: newMetadata }
    w.isLoading = true if needContentReload
    ImpacWidgetsSvc.update(w,data).then(
      (success) ->
        angular.extend(w,success.data)
        w.loadContent() if needContentReload
