Added visibility check