fix visibility determination