fixed an issue when there were more than one header rows