C-c handling