Fixed a bug with changing values of hidden fields.Further work on field sorting.