     __buildWidget: ->
       @container = $ @__options.container
       @__widgetElement = $(tpl('crop-widget')).appendTo @container
-      [@__widgetWidth, @__widgetHeight] = @__widgetSize()
       @__setState 'waiting'
 
     __clearImage: ->
       @__jCropApi?.destroy()
       if @__deferred and @__deferred.state() is 'pending'
         @__deferred.reject(IMAGE_CLEARED)
-        @__deferred = false
+      @__deferred = $.Deferred()
       if @__img
         @__img.remove()
         @__img.off()

          height: @__resizedHeight
        .appendTo @__widgetElement

    __calcImgSizes: (size) ->
      @__originalSize = size
      [@__resizedWidth, @__resizedHeight] =
        utils.fitSize @__originalSize, [@__widgetWidth, @__widgetHeight]

    __widgetSize: ->
      @__options.widgetSize or [@container.width(), @container.height()]

    #             |
    #             v


    croppedImageCoords: (previewUrl, size, coords) ->
      @__clearImage()
      @__calcSizes size
      @__setImage previewUrl
      @__initJcrop coords
      @__deferred.promise()
