 		ecuda::array<int,100> deviceArray2;
 		deviceArray1.fill( 3 );
 		deviceArray1.swap( deviceArray2 );
-		std::vector<int> hostArray;
+		std::vector<int> hostArray( 100 );
 		deviceArray2 >> hostArray;
 		bool passed = true;
 		for( std::vector<int>::size_type i = 0; i < hostArray.size(); ++i ) if( hostArray[i] != 3 ) passed = false;

	std::cerr << "Test 1" << std::endl;
	{
		ecuda::array<int,100> deviceArray( 3 ); // array filled with number 3
		std::vector<int> hostVector;
		deviceArray >> hostVector;
		bool passed = true;
		if( deviceArray.size() == 100 and hostVector.size() == deviceArray.size() ) {

		CUDA_CALL( cudaDeviceSynchronize() );

		bool passed = true;
		std::vector<int> hostResults( 100 );

		destDeviceArray >> hostResults;
		for( std::vector<int>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != i ) passed = false;
		hostResults.clear();

		hostResults.resize( 100 );
		deviceFronts >> hostResults;
		for( std::vector<int>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != 0 ) passed = false;
		hostResults.clear();

		hostResults.resize( 100 );
		deviceBacks >> hostResults;
		for( std::vector<int>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != 99 ) passed = false;
		hostResults.clear();

		hostResults.resize( 100 );
		deviceFrontsNonConst >> hostResults;
		for( std::vector<int>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != 0 ) passed = false;
		hostResults.clear();

		hostResults.resize( 100 );
		deviceBacksNonConst >> hostResults;
		for( std::vector<int>::size_type i = 0; i < hostResults.size(); ++i ) if( hostResults[i] != 99 ) passed = false;
		//hostResults.clear();
