Improve handling of SIGINT