cancle  button and escape working