diff --git a/osx/deluge b/osx/deluge
index d0041994c..1f40289a9 100644
--- a/osx/deluge
+++ b/osx/deluge
@@ -24,6 +24,7 @@ export XDG_DATA_DIRS="$bundle_data"
export GTK_DATA_PREFIX="$bundle_res"
export GTK_EXE_PREFIX="$bundle_res"
export GTK_PATH="$bundle_res"
+
export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc"
export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules"
export GDK_PIXBUF_MODULE_FILE="$bundle_lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
diff --git a/osx/deluge-console b/osx/deluge-console
old mode 100755
new mode 100644
index cd413a90d..2c3cc0721
--- a/osx/deluge-console
+++ b/osx/deluge-console
@@ -11,7 +11,7 @@ fi
tmp=`dirname "$full_path"`
tmp=`dirname "$tmp"`
bundle=`dirname "$tmp"`
-bundle_contents=${bundle%"/Contents"}"/Contents"
+bundle_contents="$bundle"/Contents
bundle_macos="$bundle_contents"/MacOS
bundle_res="$bundle_contents"/Resources
bundle_lib="$bundle_res"/lib
diff --git a/osx/deluge-web b/osx/deluge-web
old mode 100755
new mode 100644
index 7d2a44a21..9703c575c
--- a/osx/deluge-web
+++ b/osx/deluge-web
@@ -11,7 +11,7 @@ fi
tmp=`dirname "$full_path"`
tmp=`dirname "$tmp"`
bundle=`dirname "$tmp"`
-bundle_contents=${bundle%"/Contents"}"/Contents"
+bundle_contents="$bundle"/Contents
bundle_macos="$bundle_contents"/MacOS
bundle_res="$bundle_contents"/Resources
bundle_lib="$bundle_res"/lib
diff --git a/osx/deluge.bundle b/osx/deluge.bundle
index 414d7b032..c65e1f79a 100644
--- a/osx/deluge.bundle
+++ b/osx/deluge.bundle
@@ -25,10 +25,9 @@
${prefix}/lib/libboost_python.dylib
${prefix}/lib/libtorrent-rasterbar.8.dylib
${prefix}/lib/libssl.1.0.0.dylib
+ ${prefix}/lib/libz.1.2.8.dylib
-
- ${project}/../dist/deluge.app/Contents/Resources/
-
+ ${project}/../dist/deluge.app/Contents/Resources/
${prefix}/lib/pygtk/2.0/
${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/libclearlooks.so
diff --git a/osx/deluged b/osx/deluged
old mode 100755
new mode 100644
index 6fc404ac9..d88106a2d
--- a/osx/deluged
+++ b/osx/deluged
@@ -11,7 +11,7 @@ fi
tmp=`dirname "$full_path"`
tmp=`dirname "$tmp"`
bundle=`dirname "$tmp"`
-bundle_contents=${bundle%"/Contents"}"/Contents"
+bundle_contents="$bundle"/Contents
bundle_macos="$bundle_contents"/MacOS
bundle_res="$bundle_contents"/Resources
bundle_lib="$bundle_res"/lib