Fix bug related to visibility