Improve delegate registration