fix bug in SIGINT handler