add gc delegates for dialog dismissing