fix sorting of header row