modified the table document sorting for reference number [#141 state:fixed responsible:none]