Why is this needed? Looks like both events are only bound when there is a submenu.