fix bug for cancel key