fixed isVisibleHost scope issue