fixes GUI problem when using context menu