fix ^C ignored during script execution