fieldValues() method not necessarily returns values in the same order as fieldNames(). 

Could you replace values[i] with this.field(field) ?