             break;
         }
 
+        // make a local copy of the host batch
+        io::SequenceDataHost local_read_data_host = *read_data_host;
+
+        // mark this set as ready to be reused
+        input_thread.read_data[ input_set ] = NULL;
+
+        // make sure the other threads see this change
+        host_release_fence();
+
+        // advance input set pointer
+        input_set = (input_set + 1) % InputThread::BUFFERS;
+
         Timer timer;
         timer.start();
 
-        aligner.output_file->start_batch(read_data_host);
-
-        io::SequenceDataDevice read_data( *read_data_host );
+        aligner.output_file->start_batch( &local_read_data_host );
+
+        io::SequenceDataDevice read_data( local_read_data_host );
         cudaThreadSynchronize();
 
         timer.stop();
         stats.read_HtoD.add( read_data.size(), timer.seconds() );
-
-        // mark this set as ready to be reused
-        input_thread.read_data[ input_set ] = NULL;
-
-        // make sure the other threads see this change
-        host_release_fence();
-
-        // advance input set pointer
-        input_set = (input_set + 1) % InputThread::BUFFERS;
 
         const uint32 count = read_data.size();
         log_info(stderr, "aligning reads [%u, %u]\n", read_begin, read_begin + count - 1u);


        // advance input set pointer
        input_set = (input_set + 1) % InputThread::BUFFERS;

        const uint32 count = read_data1.size();
        log_info(stderr, "aligning reads [%u, %u]\n", read_begin, read_begin + count - 1u);

            break;
        }

        // make a local copy of the host batch
        io::SequenceDataHost local_read_data_host1 = *read_data_host1;
        io::SequenceDataHost local_read_data_host2 = *read_data_host2;

        // mark this set as ready to be reused
        input_thread.read_data1[ input_set ] = NULL;
