fix csv output bug - reference the correct output field