Fixed indexing problem when copying data into 24hr chuncks