bug fixes for large datasets, bug fix for blank rows at top of file