Fix: bind to 'delete' event on wrong window