Fix lifecycle callbacks
Fix lifecycle callbacks