diff --git a/src/Client.php b/src/Client.php
index <HASH>..<HASH> 100644
--- a/src/Client.php
+++ b/src/Client.php
@@ -122,11 +122,10 @@ class Client
             $this->host = $options['host'];
         }
         if (isset($options['port'])) {
-            $port = (int) $options['port'];
-            if (! $port || !is_numeric($port) || $port > 65535) {
+            if (!is_numeric($options['port']) || $options['port'] < 0 || $options['port'] > 65535) {
                 throw new ConfigurationException($this, 'Port is out of range');
             }
-            $this->port = $port;
+            $this->port = $options['port'];
         }
 
         if (isset($options['namespace'])) {
Allow usage of port zero and disallow negative ports