Added Cancel button functionality