component is being set to null after edit

used to, but now i close the editor when i do that