diff --git a/cmake_support/OST.cmake b/cmake_support/OST.cmake
index 3fd6a45f31ba8b04cb0102d9759480aac910ec2f..646adc2cf5aeb768447e2e42de66da79c083c982 100644
--- a/cmake_support/OST.cmake
+++ b/cmake_support/OST.cmake
@@ -305,7 +305,7 @@ macro(executable)
   add_executable(${_ARG_NAME} ${_ARG_SOURCES})
   if (APPLE AND NOT _ARG_NO_RPATH AND NOT ENABLE_STATIC)
     set_target_properties(${_ARG_NAME} PROPERTIES
-                          LINK_FLAGS "-Wl,-rpath,@loader_path/../lib")
+                          LINK_FLAGS "-Wl,-rpath,@loader_path/../lib/")
   endif()
   if (_ARG_LINK)
     target_link_libraries(${_ARG_NAME} ${_ARG_LINK})
diff --git a/deployment/macos/deploy.py b/deployment/macos/deploy.py
index 82a20a066af37137e9ddbc549ab21a04f6ced6b7..de10ec84cfcce14a8a158f15338b7366caad9a05 100644
--- a/deployment/macos/deploy.py
+++ b/deployment/macos/deploy.py
@@ -20,6 +20,8 @@ if os.path.exists('DNG.app'):
   shutil.rmtree('DNG.app')
 if opts.no_gui:
   out_dir='ost-%s' % ost.VERSION
+  if os.path.exists(out_dir):
+    shutil.rmtree(out_dir)
   shutil.move('standalone', out_dir)
   sys.exit(0)
 bundle.create_bundle('DNG', opts.bundle)
@@ -28,5 +30,5 @@ if opts.bundle:
   os.system('rm `find DNG.app/Contents/examples/ -name "*.pyc"` 2> /dev/null')
   os.system('rm -rf DNG.app/Contents/examples/code_fragments/')
   if opts.dmg:
-    os.system('rm -rf openstructure.dmg')
-    os.system('hdiutil create -srcFolder DNG.app openstructure.dmg')
+    os.system('rm -rf openstructure-%s.dmg' % ost.VERSION)
+    os.system('hdiutil create -srcFolder DNG.app openstructure-%s.dmg' % ost.VERSION)
diff --git a/deployment/macos/deps.py b/deployment/macos/deps.py
index 68f73d97729683e04b65f7157dd01af2ab58eb36..65474472153ea460b9e91860b58af7bf7277dbb4 100644
--- a/deployment/macos/deps.py
+++ b/deployment/macos/deps.py
@@ -72,7 +72,7 @@ LIBEXEC_SCRIPTS=['ost_config']
 LIBEXEC_BINARIES=[]
 GUI_LIBEXEC_BINARIES=['gosty']
 BINARIES=['ldt', 'chemdict_tool', 'tmalign', 'tmscore']
-GUI_BINARIES=['gosty']
+GUI_BINARIES=[]
 GUI_COMPONENTS=['gfx', 'gui', 'info']
 COMPONENTS=['mol', 'geom', 'conop', 'seq_alg', 'seq',
             'img', 'img_alg', 'io', 'db', 'base']
@@ -224,6 +224,7 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False,
   scripts=SCRIPTS
   binaries=BINARIES
   components=COMPONENTS
+  libexec_scripts=LIBEXEC_SCRIPTS
   site_packages=SITE_PACKAGES
   libexec_binaries=LIBEXEC_BINARIES
   if not no_gui:
@@ -235,10 +236,15 @@ def make_standalone(stage_dir, outdir, no_includes, force_no_rpath=False,
   print 'collecting dependencies'
   deps=collect_deps(stage_dir, components, binaries, libexec_binaries,
                     site_packages, site_packages_dir)
+  # when running in non-gui mode, we are most likely missing the boost
+  # python library. Let's add it to the list of dependencies by
+  # inspecting "_ost_base.so".
+  _deps_for_lib(os.path.join(stage_dir, 'lib/openstructure/ost/_ost_base.so'),
+                deps, recursive=False)
   print 'copying dependencies'
   copy_deps(deps, outdir)
   print 'copying libexec binaries'
-  copy_binaries(stage_dir, outdir, LIBEXEC_BINARIES, LIBEXEC_SCRIPTS,
+  copy_binaries(stage_dir, outdir, libexec_binaries, libexec_scripts,
                 'libexec/openstructure')
   print 'copying binaries'
   copy_binaries(stage_dir, outdir, binaries, scripts, 'bin')