Fix interference issue
Add lifecycle handling