diff --git a/include/class.forms.php b/include/class.forms.php
index 2c3ec0da755cbfac1bd14b502c09c3ffa224a31f..ae5103e057b919020a73afd143536527af986e0c 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -4657,7 +4657,7 @@ class FreeTextField extends FormField {
 
     function to_config($config) {
         if ($config && isset($config['attachments']))
-            $keepers = $config['attachments'] = array_values($config['attachments']);
+            $keepers = $config['attachments'];
         $this->getAttachments()->keepOnlyFileIds($keepers);
 
         return $config;