fix a NPE when display the name and id of a new element in the editor