Add visibility detection.