Correction on handling KeyboardInterrupt