fix nested fields js