diff --git a/src/filetransfers_window.py b/src/filetransfers_window.py
index 3b5a09faf853a9c105903321e75bed5238f44add..62c9948af6c7d3f4712fb2fcf767ea5e52b1c6f4 100644
--- a/src/filetransfers_window.py
+++ b/src/filetransfers_window.py
@@ -396,7 +396,7 @@ class FileTransfersWindow:
                 on_response_ok=(on_response_ok, account, contact, file_props),
                 on_response_cancel=(on_response_cancel, account, file_props))
         dialog.connect('delete-event', lambda widget, event:
-                on_response_cancel(widget, account, file_props))
+            on_response_cancel(account, file_props))
         dialog.popup()
 
     def get_icon(self, ident):