Added Cancel button function.