Handle Ctrl-C appropriately