diff --git a/handlers/rsync.in b/handlers/rsync.in
index c5c7cac460c730c65f6b136464628be89d2fb67a..2d00267dc4d14e4ee11621a05de9298517e53e1c 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -275,7 +275,7 @@ function eval_config {
     mv=move_files
   fi
 
-  excludes=`echo "$exclude" | @SED@ "s/^/--exclude='/g" -e "s/ /' --exclude='/g" -e "s/$/'/"`
+  excludes=`echo "$exclude" | @SED@ -e "s/^/--exclude='/g" -e "s/ /' --exclude='/g" -e "s/$/'/"`
 
 }
 
@@ -406,7 +406,7 @@ function rotate_long {
     fi
     
     # Rotate the current list of backups, if we can.
-    oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1`
+    oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1`
     [ "$oldest" == "" ] && oldest=0
     for (( i=$oldest; i > 0; i-- )); do
       if [ -d $dir.$i ]; then
@@ -468,7 +468,7 @@ function rotate_long {
   for rottype in daily weekly monthly; do
     max=$((keep${rottype}+1))
     dir="$backuproot/$rottype"
-    oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1`
+    oldest=`find $backuproot -maxdepth 1 -type d -name $rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1`
     [ "$oldest" == "" ] && oldest=0 
     # if we've rotated the last backup off the stack, remove it.
     for (( i=$oldest; i >= $max; i-- )); do
@@ -529,7 +529,7 @@ function rotate_long_remote {
     fi
     
     # Rotate the current list of backups, if we can.
-    oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
+    oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1\`
     [ "\$oldest" == "" ] && oldest=0
     for (( i=\$oldest; i > 0; i-- )); do
       if [ -d \$dir.\$i ]; then
@@ -591,7 +591,7 @@ function rotate_long_remote {
   for rottype in daily weekly monthly; do
     max=\$((keep\${rottype}+1))
     dir="$backuproot/\$rottype"
-    oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ 's/^.*\.//' | sort -n | tail -1\`
+    oldest=\`find $backuproot -maxdepth 1 -type d -name \$rottype'.*' | @SED@ -e 's/^.*\.//' | sort -n | tail -1\`
     [ "\$oldest" == "" ] && oldest=0 
     # if we've rotated the last backup off the stack, remove it.
     for (( i=\$oldest; i >= \$max; i-- )); do