   deactivateResources: ->
     grammar.deactivate() for grammar in @grammars
     scopedProperties.deactivate() for scopedProperties in @scopedProperties
-    atom.themes.removeStylesheet(stylesheetPath) for [stylesheetPath] in @stylesheets
+    @stylesheetDisposables?.dispose()
     @activationDisposables?.dispose()
     @stylesheetsActivated = false
     @grammarsActivated = false

  keymaps: null
  menus: null
  stylesheets: null
  grammars: null
  scopedProperties: null
  mainModulePath: null


    context = 'atom-text-editor' if @metadata.theme is 'syntax'
    group = @getStylesheetType()
    @stylesheetDisposables = new CompositeDisposable
    for [sourcePath, source] in @stylesheets
      @stylesheetDisposables.add(atom.styles.addStyleSheet(source, {sourcePath, group, context}))
    @stylesheetsActivated = true

  activateResources: ->
