Correct handling keyboard interruption