 
 	__device__ __host__ void sendDone() {
 		command = DONE;
+		done = true;
 		//init();
 	}
 };

		return NULL;
	}

	void sendCommand() {

		switch (command) {


	// clean up after cuPrintf
	cudaPrintfEnd();

	h_kernelWrapper->active_thread_id = 0;
	h_kernelWrapper->sendDone();

	// wait for SocketServer
	pthread_join(t_socket_server, NULL);

