Delete dialog works properly