     @subscriptions.add @editor.onDidDestroy => @destroy()
 
     @subscriptions.add @editor.onDidChange =>
-      @terminateRunningTask()
+      @terminateRunningTask() if @initialized and @variableInitialized
       clearTimeout(@timeout) if @timeout?
 
     @subscriptions.add @editor.onDidStopChanging =>


    @initializePromise = @scanBufferForColors().then (results) =>
      @colorMarkers = @createColorMarkers(results)

    @variablesAvailable()
    @initializePromise

      @scanBufferForColors variables: results
    .then (results) =>
      @updateColorMarkers(results)
      @variableInitialized = true
    .catch (reason) ->
      console.log reason

