           })
           .css('display', 'none')
           .appendTo('body')
-          .on('load', (e) =>
-            @__onLoad()
-            complete()
-          )
-          .on('error', => @__onError(); complete())
+          .on('load', (e) => @__onLoad(); @__cleanUp())
+          .on('error', => @__onError(); @__cleanUp())
 
         formParam = (name, value) ->
           $('<input>')


      cancel: ->
        @xhr.abort() if @xhr?
        @iframe.off('load error') if @iframe

      __constructUuid: ->
        @fileId = utils.uuid()

          .on('submit', @__onStart)
          .submit()

      __cleanUp: ->
        @iframe.remove() if @iframe?
        @iframeForm.remove() if @iframeForm?
        @xhr = null
        @iframe = null
        @iframeForm = null

      __onError: => $(this).trigger('uploadcare.api.uploader.error')
      __onStart: => $(this).trigger('uploadcare.api.uploader.start')
