diff --git a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote b/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
index bed40ffa..312e6f81 100755
--- a/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
+++ b/cdist/conf/type/__install_partition_msdos_apply/gencode-remote
@@ -40,16 +40,16 @@ size_to_mb() {
 
    case "$suffix" in
       K|k)
-         size="$(( $number / 1024 ))"
+         size="$(( number / 1024 ))"
          ;;
       M|m)
          size="$number"
          ;;
       G|g)
-         size="$(( $number * 1024 ))"
+         size="$(( number * 1024 ))"
          ;;
       %)
-         size="$(( $available_size * $number / 100 ))"
+         size="$(( available_size * number / 100 ))"
          ;;
       *)
          size="-1"
@@ -108,7 +108,7 @@ for object in $objects; do
 
    if [ "${minor}" -lt "5" ]; then
       # Primary partitions
-      primary_count=$(( $primary_count + 1 ))
+      primary_count=$(( primary_count + 1 ))
       available_size=$available_device_size
    else
       # Logical partitions
@@ -121,7 +121,7 @@ for object in $objects; do
       available_size=0
    else
       partition_size=$(size_to_mb "$size" "$available_size")
-      available_size="$(( $available_size - $partition_size ))"
+      available_size="$(( available_size - partition_size ))"
    fi
 
    if [ "${minor}" -lt "5" ]; then
diff --git a/cdist/conf/type/__prometheus_alertmanager/manifest b/cdist/conf/type/__prometheus_alertmanager/manifest
index be50b71e..054e44cb 100755
--- a/cdist/conf/type/__prometheus_alertmanager/manifest
+++ b/cdist/conf/type/__prometheus_alertmanager/manifest
@@ -48,7 +48,7 @@ __key_value alertmanager_fix_init_script --file /etc/init.d/prometheus-alertmana
 
 ##### CONFIGURE #############################################################
 
-FLAGS="--storage.path $storage_path --data.retention $(($retention_days*24))h --web.listen-address [::]:9093"
+FLAGS="--storage.path $storage_path --data.retention $((retention_days*24))h --web.listen-address [::]:9093"
 
 require="$require $require_pkg" \
 __key_value alertmanager_args --file /etc/default/prometheus-alertmanager \
diff --git a/cdist/conf/type/__prometheus_server/manifest b/cdist/conf/type/__prometheus_server/manifest
index 84ba53cf..e2f32fd5 100755
--- a/cdist/conf/type/__prometheus_server/manifest
+++ b/cdist/conf/type/__prometheus_server/manifest
@@ -45,7 +45,7 @@ require="$require $require_pkg" __directory "$storage_path" --owner prometheus -
 
 ##### CONFIGURE #############################################################
 
-FLAGS="--storage.tsdb.path $storage_path --storage.tsdb.retention $(($retention_days*24))h --web.listen-address [::]:9090"
+FLAGS="--storage.tsdb.path $storage_path --storage.tsdb.retention $((retention_days*24))h --web.listen-address [::]:9090"
 
 # TODO it would be neat to restart prometheus on change -- __key_value really should have an --onchange parameter
 require="$require $require_pkg" \