diff --git a/sbin/stop-slaves.sh b/sbin/stop-slaves.sh
index c6b0b6ab6695c505f9368d5862579a1b5bc952dc..eb803b4900347e833ea0be5d2b4ae11845988de9 100755
--- a/sbin/stop-slaves.sh
+++ b/sbin/stop-slaves.sh
@@ -17,8 +17,8 @@
 # limitations under the License.
 #
 
-bin=`dirname "$0"`
-bin=`cd "$sbin"; pwd`
+sbin=`dirname "$0"`
+sbin=`cd "$sbin"; pwd`
 
 . "$sbin/spark-config.sh"