diff --git a/includes/kaapi_trace.h b/includes/kaapi_trace.h
index 3f653e724cd5622924473e79de7cc6c6332b54c3..256013240807f7a48d44f6146e6ba9b7b627ecad 100644
--- a/includes/kaapi_trace.h
+++ b/includes/kaapi_trace.h
@@ -47,16 +47,11 @@
 
 #include <stdint.h>
 #include <stddef.h>
-#include "hw_count.h" 
 
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
-#if !defined(KAAPI_MAX_HWCOUNTERS)
-#define KAAPI_MAX_HWCOUNTERS 4
-#endif
-
 #if !defined(KAAPI_CACHE_LINE)
 #define KAAPI_CACHE_LINE 64
 #endif
@@ -161,10 +156,6 @@ extern double kaapi_get_elapsedtime(void);
 #define KAAPI_PERF_GROUP_DFGBUILD  4
 #define KAAPI_PERF_GROUP_OFFLOAD   5
 
-#if ((KAAPI_PERF_ID_ENDSOFTWARE+KAAPI_MAX_HWCOUNTERS) > KAAPI_PERF_ID_MAX)
-#error "The maximal size of the peformance counters handled by Kaapi should be extended. Please contact the authors."
-#endif
-
 
 /* counter type
 */
diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt
index 44ed1c6e9edff510fe229c860e57f202aed07e6c..2db4edd2ea890a884015992cc419ca19c2351bdf 100644
--- a/tool/CMakeLists.txt
+++ b/tool/CMakeLists.txt
@@ -9,13 +9,8 @@ set(SOURCES
   ompt_callbacks.cpp
   )
 
-add_custom_command (
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h
-  COMMAND ${SHELL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/config/hw_count.sh ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h
-  )
-
 include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
 
-add_library(tikki SHARED ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h)
+add_library(tikki SHARED ${SOURCES} )
 target_link_libraries (tikki tracelib)
 install(TARGETS tikki DESTINATION lib)
diff --git a/tracelib/kaapi_trace_lib.c b/tracelib/kaapi_trace_lib.c
index 2d7f1bbbb66b5f3b68d45a5d62bf372394eba395..07892ca9299cbd6fd2cf210aca18095696946351 100644
--- a/tracelib/kaapi_trace_lib.c
+++ b/tracelib/kaapi_trace_lib.c
@@ -108,6 +108,11 @@ typedef struct timespec struct_time;
 #include "kaapi_util.h"
 #include "kaapi_atomic.h"
 
+#if ((KAAPI_PERF_ID_ENDSOFTWARE+KAAPI_MAX_HWCOUNTERS) > KAAPI_PERF_ID_MAX)
+#error "The maximal size of the peformance counters handled by Kaapi should be extended. Please contact the authors."
+#endif
+
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
@@ -1072,7 +1077,7 @@ kaapi_tracelib_thread_t* kaapi_tracelib_thread_init(
     {
       if (kaapi_perf_idset_test( &ctxt->perfset, i))
       {
-printf("Attach event: '%s'\n", kaapi_perfctr_info[i].name);
+//printf("Attach event: '%s'\n", kaapi_perfctr_info[i].name);
         papi_event_codes[count++] = kaapi_perfctr_info[i].eventcode;
       }      
     }
diff --git a/ukilli/CMakeLists.txt b/ukilli/CMakeLists.txt
index 283965bffd8faba5b5d3c4606008b7853b6664ea..aa06d436af22563aec2312b43ff36f6a71cce90f 100644
--- a/ukilli/CMakeLists.txt
+++ b/ukilli/CMakeLists.txt
@@ -8,13 +8,8 @@ set(SOURCES
   ${CMAKE_SOURCE_DIR}/poti/src/poti_header.c
   )
 
-add_custom_command (
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h
-  COMMAND ${SHELL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/config/hw_count.sh ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h
-  )
-
 include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
 
-add_executable(ukilli ${SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/hw_count.h)
+add_executable(ukilli ${SOURCES})
 target_link_libraries (ukilli tracelib)
 install(TARGETS ukilli DESTINATION bin)