Add extra select values to column headers

The previous commit introduced a bug - the extra selected columns were included but not having their names written to the header.