Move editmenu into Wrong global and check to see if it exists before calling on contextmenu.