diff --git a/scripts/upgrade b/scripts/upgrade
index 2bca6cc..6caeb70 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -100,7 +100,7 @@ fi
 #=================================================
 backup_before_upgrade=$(ynh_app_setting_get --app=$app --key=backup_before_upgrade)
 if [ -z "$backup_before_upgrade" ] ; then
-  if [ $(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade) ] ; then
+  if $(ynh_app_setting_get --app=$app --key=disable_backup_before_upgrade) ; then
   backup_before_upgrade="false"
 fi
 
@@ -113,8 +113,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
 ynh_systemd_action --service_name=matrix-$app.service --action=stop
 
 # Backup the current version of the app
-if [ backup_before_upgrade ]
-then
+if $backup_before_upgrade ; then
     ynh_backup_before_upgrade
     ynh_clean_setup () {
         # Clean installation remainings that are not handled by the remove script.