fix for not saving data,related to order of fields