ctrl-c bug fix for SIGINT capture