diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90755377da882c5c1d7c2e4b31134786a1df957c..30644507311cb4a969102c25db2c5fb9af620008 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -177,7 +177,6 @@ if (ENABLE_STATIC)
   set(Boost_USE_STATIC_LIBS ON)
   find_package(Boost ${_BOOST_MIN_VERSION} 
                COMPONENTS filesystem system iostreams regex REQUIRED)
-  message(${Boost_LIBRARIES})
   find_package(ZLIB REQUIRED)
   set(STATIC_LIBRARIES ${Boost_LIBRARIES} ${FFTW_LIBRARIES} ${TIFF_LIBRARIES} 
       ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
diff --git a/cmake_support/FindBoost.cmake b/cmake_support/FindBoost.cmake
index e5cc004e34fa69b3be7fcb72cb741cefd6e145f8..47019edeb51ac0d09aecbe6859e1bc34d3253f9b 100644
--- a/cmake_support/FindBoost.cmake
+++ b/cmake_support/FindBoost.cmake
@@ -649,7 +649,6 @@ ${BOOST_ROOT}/lib
 ${BOOST_ROOT}/lib/boost-${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}
       ${BOOST_ROOT}/stage/lib
       ${_boost_LIBRARIES_SEARCH_DIRS})
-message("boost searchdirs:${_boost_LIBRARIES_SEARCH_DIRS}")
   ENDIF( BOOST_ROOT )
 
   IF( BOOST_LIBRARYDIR )
diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake
index 297696f4ce0d1468309feed082bc96c68f0fa302..89c0f0973438df94ecf1bb98897432557f9cf637 100644
--- a/cmake_support/OST.cmake
+++ b/cmake_support/OST.cmake
@@ -211,7 +211,7 @@ macro(module)
       foreach(_DEPENDENCY ${_ARG_DEPENDS_ON})
         target_link_libraries(${_LIB_NAME}_static ${_DEPENDENCY}_static)
       endforeach()
-      target_link_libraries(${_LIB_NAME} ${ZLIB_LIBRARIES})
+      target_link_libraries(${_LIB_NAME}_static ${ZLIB_LIBRARIES} ${_ARG_LINK})
     endif()
     if (APPLE)
       set_target_properties(${_LIB_NAME} PROPERTIES
diff --git a/modules/io/pymod/CMakeLists.txt b/modules/io/pymod/CMakeLists.txt
index 023e000b89398ba1d2284b5f9fa778c1eb8dffd2..38f43cdfae0dae30f926ce679fbb0fcbeefe240b 100644
--- a/modules/io/pymod/CMakeLists.txt
+++ b/modules/io/pymod/CMakeLists.txt
@@ -18,6 +18,6 @@ set(OST_IO_PYMOD_MODULES
 pymod(NAME io CPP ${OST_IO_PYMOD_SOURCES} PY ${OST_IO_PYMOD_MODULES})
 if (STATIC_LIBRARIES)
   message("adding zlib libraries")
-  target_link_libraries(_io ${ZLIB_LIBRARIES})
+  target_link_libraries(_ost_io ${ZLIB_LIBRARIES})
 endif()
 
diff --git a/modules/io/pymod/__init__.py b/modules/io/pymod/__init__.py
index 6e2f319b0ccd824c7f6e6763264802cf4676e790..82648571c20462a5c0b0d5e6dea12bdfa2217770 100644
--- a/modules/io/pymod/__init__.py
+++ b/modules/io/pymod/__init__.py
@@ -177,7 +177,7 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
         conop_inst.ConnectAll(builder, ent, 0)
         ent_list.append(ent)
       if len(ent_list)==0:
-        raise IOError("File doesn't contain any entities")
+        raise IOError("File '%s' doesn't contain any entities" % filename)
       return ent_list
     else:
       ent=mol.CreateEntity()
@@ -185,7 +185,7 @@ def LoadPDB(filename, restrict_chains="", no_hetatms=None,
         reader.Import(ent, restrict_chains)
         conop_inst.ConnectAll(builder, ent, 0)
       else:
-        raise IOError("File doesn't contain any entities")
+        raise IOError("File '%s' doesn't contain any entities" % filename)
       if seqres:
         return ent, reader.seqres
       return ent
diff --git a/modules/mol/alg/src/CMakeLists.txt b/modules/mol/alg/src/CMakeLists.txt
index 8523cd361447ed71b869f2c100ea6b6167fe104a..3c295068bf65bc99dba45e1cd2796a4a07073117 100644
--- a/modules/mol/alg/src/CMakeLists.txt
+++ b/modules/mol/alg/src/CMakeLists.txt
@@ -39,6 +39,7 @@ endif()
 
 executable(NAME ldt SOURCES ldt.cc 
            DEPENDS_ON ost_io ost_mol_alg STATIC)
+target_link_libraries(ldt ${BOOST_PROGRAM_OPTIONS})
 
 module(NAME mol_alg SOURCES ${OST_MOL_ALG_SOURCES}
        HEADERS ${OST_MOL_ALG_HEADERS}
@@ -54,4 +55,4 @@ install(FILES "atom_scattering_properties.txt" DESTINATION "share/openstructure/
 copy_if_different("." "${STAGE_DIR}/share/openstructure"
                   "stereo_chemical_props.txt" "STEREO_CHEMICAL_PROPS"
                   "ost_mol_alg")
-install(FILES "stereo_chemical_props.txt" DESTINATION "share/openstructure/")
\ No newline at end of file
+install(FILES "stereo_chemical_props.txt" DESTINATION "share/openstructure/")