fix traceback in is_visible() on context menu