Corrected visibility check.