Cast the delegate assignments to avoid any type warnings.