diff --git a/boxes.js b/boxes.js
index 606639e..1152444 100644
--- a/boxes.js
+++ b/boxes.js
@@ -29,8 +29,7 @@
           modal : true,
           close: function(e){
              //handle someone closing the box without clicking any buttons             
-             $(response.selector).removeClass('hasPopup');
-             $(this).remove();
+             $('.boxes-ajax.use-ajax-submit.form-submit[value="Cancel"]').click();
           },
           open: function(ui, event){
             $(this).siblings('.ui-dialog-titlebar').children('.ui-dialog-titlebar-close').click(function(e){
