Untested code to add any missing elements on update