 		kernel_testFillAndSwap<<<1,1>>>( deviceArray1, deviceArray2 );
 		CUDA_CHECK_ERRORS();
 		CUDA_CALL( cudaDeviceSynchronize() );
-		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;

		CUDA_CHECK_ERRORS();
		CUDA_CALL( cudaDeviceSynchronize() );

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

		ecuda::array<int,100> deviceArray2;
		deviceArray1.fill( 3 );
		deviceArray1.swap( deviceArray2 );
		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;
