fixed bug where the popupmenu doesnt appear by changing back from visualization mode to graph mode