Added visibility checks.