Better logic for visibility.