Add some lifecycle safety