diff --git a/main.cpp b/main.cpp
index 6b69233cf309806254cf978f8a3dbfaa3bac09c2..1f3e1da91b500f698321f28d1bc751aa37967f1a 100644
--- a/main.cpp
+++ b/main.cpp
@@ -19,9 +19,15 @@ void txt2pcd( std::filesystem::path input, std::filesystem::path output )
             inputFile >> point.y;
             inputFile >> point.z;
 
-            inputFile >> point.r;
-            inputFile >> point.g;
-            inputFile >> point.b;
+            int r, g, b;
+
+            inputFile >> r;
+            inputFile >> g;
+            inputFile >> b;
+
+            point.r = static_cast<char>( r );
+            point.g = static_cast<char>( g );
+            point.b = static_cast<char>( b );
 
             cloud.push_back( point );
         }
diff --git a/meson.build b/meson.build
index 7327966f1b199b8b30ff7f2839c71747ba6c8c09..ba671d6781038dfca66f4ec9cfacc4accdd3ca18 100644
--- a/meson.build
+++ b/meson.build
@@ -8,5 +8,6 @@ pcl_io_dep = dependency('pcl_io-@0@'.format(pcl_version),
 boost_dep = dependency('boost')
 
 executable('txt2pcd', sources: files(['main.cpp']),
-           dependencies: [pcl_io_dep, boost_dep])
+           dependencies: [pcl_io_dep, boost_dep],
+           install: true)