diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/sort_list_dialog.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/sort_list_dialog.xml
index ded38703b29a211f1b509c3e90de76dedecdc278..ebaaa552d64cb8439b17be7c7d3ecdcd9a09ee3c 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/sort_list_dialog.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/sort_list_dialog.xml
@@ -100,7 +100,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
               <tal:block tal:replace="row_index" />\n
             </label>\n
             <div class="input" tal:attributes="id string:sort_${row_index}"\n
-                               tal:define="sort_type python:item[min(2, len(item))]">\n
+                               tal:define="sort_type python:((len(item) > 2) and item[2]) or \'\'">\n
               <select name="field_sort_on">\n
                 <tal:block tal:repeat="option all_columns">\n
                   <option tal:content="python:option[1]"\n