           restart()
 
       restart = ->
-        $timeout animate, 200
+        timeoutPromise = $timeout animate, 200
 
       tweenable = new Tweenable()
       animate = ->

      @updateDifferences()

    @updateDifferences = ->
      $log.info "updateDifferences"
      if @start isnt undefined and @end isnt undefined
        sum = getSumByDates @start, @end
        @days = sum.days

      updateElement = (value)->
        $(element)[0].text parseInt(value)

      element.bind '$destroy', ->
        # cancel timeout
        $timeout.cancel timeoutPromise
        # cancel tween
        tweenable.stop()


]
