 		CUDA_CALL( cudaDeviceSynchronize() );
 
 		bool passed = true;
-		std::vector<int> hostResults;
+		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();

		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;

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