fixed off by 1 when exporting records.