Adding action to cancel button