bug fix on Issue 1342-CancelButton