Fix incorrect variable usage

fixing incorrect variable use in keyNameToFieldName