Fixed bug where header was tripling the record count