diff --git a/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cu b/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cu
index 6739c72846f0e83969fc136b0e4fea5056957ed7..f2b5d6346de96172610bacadc1aa76406e004f4b 100644
--- a/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cu
+++ b/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cu
@@ -259,9 +259,9 @@ void VTKReader::fillArrays(std::vector<real>& coordsY, std::vector<real>& coords
         real posZ = coordsZ[i];
         bool foundNT = false, foundNB = false, foundST = false, foundSB = false, foundAll = false;
 
-        for(uint level=this->fileCollection->files.size(); level>0; level--) // go backwards to find finest nodes first
+        for(int level= static_cast<int>(this->fileCollection->files.size())-1; level>=0; level--) // go backwards to find finest nodes first
         {
-            for(uint fileId=0; fileId<this->fileCollection->files[level].size(); fileId++)
+            for(int fileId=0; static_cast<int>(fileId<this->fileCollection->files[level].size()); fileId++)
             {
                 VTKFile file = this->fileCollection->files[level][fileId][0];
                 if(!file.inBoundingBox(posY, posZ, 0.0f)) continue;