Fix context menu item appearing when it shouldn't