Could you put this line right before the call to `fields.add(null)` ?