diff --git a/include/class.forms.php b/include/class.forms.php
index 4ceee8a551ef792927dee7af022ae5dc5ecb1966..0cbabf90b238cd0fd84fb6fa71fe4bbdca9f2f83 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -4663,7 +4663,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;