Make sure the delegate is also called if we dismiss the alert programmatically.