diff --git a/CMakeLists.txt b/CMakeLists.txt
index c988ae1a6cbe29475598b58ea1fce38ab44c9cb3..1e9838b4727d6ed946df6aec34bfc939601e542f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,7 @@ set( WITH_TBB "OFF" CACHE BOOL "use TBB for on-node threading" )
 if( "${WITH_TBB}" STREQUAL "ON" )
     find_package(TBB REQUIRED)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_TBB ${TBB_DEFINITIONS}")
+    link_directories(${TBB_LIBRARY})
 endif()
 
 
diff --git a/src/cell_group.hpp b/src/cell_group.hpp
index d9ea455126362acf3bf78160870c57740b2d771a..767a483b55b35eeb1cb49876bda84d5802fea756 100644
--- a/src/cell_group.hpp
+++ b/src/cell_group.hpp
@@ -52,7 +52,7 @@ class cell_group {
 
     void splat(std::string fname) {
         char buffer[128];
-        auto fid = std::ofstream(fname);
+        std::ofstream fid(fname);
         for(auto i=0u; i<tt.size(); ++i) {
             sprintf(buffer, "%8.4f %16.8f %16.8f\n", tt[i], vs[i], vd[i]);
             fid << buffer;
diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp
index 1951143cfb35a1721b5484e7057abf9ed8913bac..2a7593858cead5731553cfd612e9fd7f3a4b804b 100644
--- a/src/communication/communicator.hpp
+++ b/src/communication/communicator.hpp
@@ -10,7 +10,6 @@
 #include <algorithms.hpp>
 #include <event_queue.hpp>
 
-
 #include "connection.hpp"
 
 namespace nest {
@@ -205,7 +204,7 @@ private:
 
     // thread private storage for accumulating spikes
     using local_spike_store_type =
-        nest::mc::threading:: enumerable_thread_specific<std::vector<spike_type>>;
+        nest::mc::threading::enumerable_thread_specific<std::vector<spike_type>>;
     /*
 #ifdef WITH_TBB
     using local_spike_store_type =
diff --git a/src/threading/tbb.hpp b/src/threading/tbb.hpp
index 56c09913e8345e71385140204c59dabced1e2d03..32097586169f794c90baafdbd948f8b60df025d6 100644
--- a/src/threading/tbb.hpp
+++ b/src/threading/tbb.hpp
@@ -15,7 +15,7 @@ namespace mc {
 namespace threading {
 
 template <typename T>
-class enumerable_thread_specific;
+using enumerable_thread_specific = tbb::enumerable_thread_specific<T>;
 
 struct parallel_for {
     template <typename F>