diff --git a/CMakeLists.txt b/CMakeLists.txt
index beec9fbb427afadccef156139bd277d743e6999f..61f02147722086c32a0cc24d3b6492cacce68ad4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,8 @@ if (PYBIND)
     ##
 endif()
 
-target_link_libraries(${module_name} PUBLIC Threads::Threads fmt::fmt)
+target_link_libraries(${module_name} PRIVATE fmt::fmt)
+target_link_libraries(${module_name} PUBLIC Threads::Threads)
 target_compile_features(${module_name} PRIVATE cxx_std_14)
 
 if (DOSANITIZE STREQUAL "ON")
diff --git a/include/aidge/data/Elts.hpp b/include/aidge/data/Elts.hpp
index 1a5a9e10ea131751ff5616eb2c310068d42ce991..bc4a225fc87a44e10a96da85f5b26048fbfad98c 100644
--- a/include/aidge/data/Elts.hpp
+++ b/include/aidge/data/Elts.hpp
@@ -101,12 +101,12 @@ private:
 template<>
 struct fmt::formatter<Aidge::Elts_t> {
     template<typename ParseContext>
-    inline constexpr auto parse(ParseContext& ctx) {
+    inline constexpr auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
         return ctx.begin();
     }
 
     template<typename FormatContext>
-    inline auto format(Aidge::Elts_t const& elt, FormatContext& ctx) {
+    inline auto format(const Aidge::Elts_t& elt, FormatContext& ctx) const {
         return fmt::format_to(ctx.out(), "{}:{}", elt.data, elt.token);
     }
 };