removed duplicated update-count and set visibility calls