Fixing a bug causing the columns on insert statements to be added for each set of data.