Fix cancel ajax with CTRL+D