Fixed visibility check