Fixed bug where incorrect columns from csv file were being copied to the results file