Fix setting an nullptr parent element
Fix duplication of newly added elements on config reload