Fix missing custom menu entries.
Fix #163, fatal error when create new element.