fix visibility check