diff --git a/lib/Predis.php b/lib/Predis.php
index <HASH>..<HASH> 100644
--- a/lib/Predis.php
+++ b/lib/Predis.php
@@ -448,9 +448,11 @@ abstract class Command implements ICommand {
                 $key = $this->_arguments[0];
 
                 $start = strpos($key, '{');
-                $end   = strpos($key, '}');
-                if ($start !== false && $end !== false) {
-                    $key = substr($key, ++$start, $end - $start);
+                if ($start !== false) {
+                    $end = strpos($key, '}');
+                    if ($end !== false) {
+                        $key = substr($key, ++$start, $end - $start);
+                    }
                 }
 
                 $this->_hash = $distributor->generateKey($key);
Optimize when a pair of curly brackets for key tagging is missing.