Fix register and unregister menu item funcs