Set the correct visibility.