diff --git a/VirtualRobot/Import/URDF/SimoxURDFFactory.cpp b/VirtualRobot/Import/URDF/SimoxURDFFactory.cpp
index 5d5c63e7eb1533aac442f54be7b36a842807c41e..ce6bbc4c59eb14a3485816054180ed0133809bd0 100644
--- a/VirtualRobot/Import/URDF/SimoxURDFFactory.cpp
+++ b/VirtualRobot/Import/URDF/SimoxURDFFactory.cpp
@@ -38,7 +38,7 @@ namespace VirtualRobot
         urdf::ModelInterfaceSharedPtr urdf_model = urdf::parseURDFFile(filename.c_str());
 
         std::filesystem::path filenameBaseComplete(filename);
-        std::filesystem::path filenameBasePath = filenameBaseComplete.branch_path();
+        std::filesystem::path filenameBasePath = filenameBaseComplete.parent_path();
         std::string basePath = filenameBasePath.string();
 
         if (!urdf_model)
diff --git a/VirtualRobot/examples/loadURDFRobot/loadURDFobot.cpp b/VirtualRobot/examples/loadURDFRobot/loadURDFobot.cpp
index 7a32e06ff6ef73c21a18c65c007f03bd33b3c1df..50948a405bd716bcde4bae886d1ec2cf6285f10b 100644
--- a/VirtualRobot/examples/loadURDFRobot/loadURDFobot.cpp
+++ b/VirtualRobot/examples/loadURDFRobot/loadURDFobot.cpp
@@ -33,7 +33,7 @@ int main(int argc, char* argv[])
     // load model from file and convert it to the simox robot format
     RobotPtr r = f.loadFromFile(urdfFile);
 
-    std::string outPath = std::filesystem::initial_path().generic_string();
+    std::string outPath = std::filesystem::current_path().generic_string();
     cout << "Saving converted file to " << outPath << "/urdf_output.xml..." << endl;
 
     RobotIO::saveXML(r, "urdf_output.xml", outPath);