implement cancel preview button