fix CTRL-C handler