[fixes #3] Backport lifecycle hooks