diff --git a/modules/csv/src/ovCCSV.cpp b/modules/csv/src/ovCCSV.cpp
index 8d3443dfac725c924a543bd79aed5609291eecb6..e5ade4a58d5794a55986f810f40dc9823ffe48a3 100755
--- a/modules/csv/src/ovCCSV.cpp
+++ b/modules/csv/src/ovCCSV.cpp
@@ -585,7 +585,6 @@ bool CCSVHandler::readSamplesAndEventsFromFile(size_t chunksToRead, std::vector<
 	}
 
 	chunks.clear();
-	chunks.reserve(chunksToRead);
 
 	// Calculate the size of the matrix depending of the stream type
 	size_t matrixSize = static_cast<size_t>(m_SampleCountPerBuffer);
diff --git a/plugins/processing/file-io/src/box-algorithms/csv/ovpCBoxAlgorithmOVCSVFileReader.cpp b/plugins/processing/file-io/src/box-algorithms/csv/ovpCBoxAlgorithmOVCSVFileReader.cpp
index 9f22d6e3f4aa1b689242ef39aaa6894b5f564ad6..c6a2d1a01df17031ed1094c4fc4b28bbedc2f95d 100755
--- a/plugins/processing/file-io/src/box-algorithms/csv/ovpCBoxAlgorithmOVCSVFileReader.cpp
+++ b/plugins/processing/file-io/src/box-algorithms/csv/ovpCBoxAlgorithmOVCSVFileReader.cpp
@@ -231,9 +231,9 @@ bool CBoxAlgorithmOVCSVFileReader::process(void)
 					"Failed to set dimension label",
 					ErrorType::Internal);
 			}
-		}
 
-		m_AlgorithmEncoder.getInputSamplingRate() = m_SamplingRate;
+			m_AlgorithmEncoder.getInputSamplingRate() = m_SamplingRate;
+		}
 
 		OV_ERROR_UNLESS_KRF(m_AlgorithmEncoder.encodeHeader(),
 			"Failed to encode signal header",
@@ -269,16 +269,16 @@ bool CBoxAlgorithmOVCSVFileReader::process(void)
 		} while (!m_SavedChunks.empty() && m_SavedChunks.back().startTime < currentTime && m_ReaderLib->hasDataToRead());
 	}
 
-	double chunkStartTime = m_SavedChunks.cbegin()->startTime;
-	double chunkEndTime = m_SavedChunks.back().endTime;
-
-	// send stimulations chunk even if there is no stimulations, chunks have to be continued
-	OV_ERROR_UNLESS_KRF(this->processStimulation(chunkStartTime, chunkEndTime),
-						"Error during stimulation process",
-						ErrorType::Internal);
-
 	if (!m_SavedChunks.empty())
 	{
+		double chunkStartTime = m_SavedChunks.cbegin()->startTime;
+		double chunkEndTime = m_SavedChunks.back().endTime;
+
+		// send stimulations chunk even if there is no stimulations, chunks have to be continued
+		OV_ERROR_UNLESS_KRF(this->processStimulation(chunkStartTime, chunkEndTime),
+			"Error during stimulation process",
+			ErrorType::Internal);
+
 		uint32_t chunksToRemove = 0;
 
 		for (const SMatrixChunk& chunk : m_SavedChunks)