correctly handle as sigint