fixed clicking delete twice and editing deleted item