Fix gallery app when visitor is not connected

Fix in the upgrade script