diff --git a/Controller/Click/Index.php b/Controller/Click/Index.php
index b5c9b8f..b114367 100755
--- a/Controller/Click/Index.php
+++ b/Controller/Click/Index.php
@@ -39,32 +39,33 @@ public function __construct(
 
     public function execute()
     {
-        try {
-            if ($bannerId = $this->_request->getParam('id')) {
-                $this->_banner->load($bannerId);
-                if ($this->_banner->getId()) {
-                    $this->_statistic->incrementClicksCount($bannerId);
+        $bannerId = (int) $this->_request->getParam('id');
+        if (!$bannerId) {
+            return $this->resultForwardFactory->create()->forward('noroute');
+        }
+
+        $this->_banner->load($bannerId);
+        if (!$this->_banner->getId()) {
+            return $this->resultForwardFactory->create()->forward('noroute');
+        }
 
-                    $redirectUrl = $this->_banner->getUrl();
-                    if (strpos($redirectUrl, 'www.') === 0) {
-                        $redirectUrl = 'http://' . $this->_banner->getUrl();
-                    } elseif (strpos($redirectUrl, 'http://') !== 0
-                        && strpos($redirectUrl, 'https://') !== 0) {
+        $this->_statistic->incrementClicksCount($this->_banner->getId());
 
-                        if (false === strpos($redirectUrl, '.html')) {
-                            $redirectUrl = $this->_url->getUrl($redirectUrl);
-                        } else {
-                            // hotfix for catalog links.
-                            // @todo: add ability to contol method that should be used?
-                            $redirectUrl = $this->_url->getDirectUrl($redirectUrl);
-                        }
-                    }
-                    return $this->resultRedirectFactory->create()->setUrl($redirectUrl);
-                }
+        $redirectUrl = $this->_banner->getUrl();
+        if (strpos($redirectUrl, 'www.') === 0) {
+            $redirectUrl = 'http://' . $this->_banner->getUrl();
+        } elseif (strpos($redirectUrl, 'http://') !== 0
+            && strpos($redirectUrl, 'https://') !== 0) {
+
+            if (false === strpos($redirectUrl, '.html')) {
+                $redirectUrl = $this->_url->getUrl($redirectUrl);
+            } else {
+                // hotfix for catalog links.
+                // @todo: add ability to contol method that should be used?
+                $redirectUrl = $this->_url->getDirectUrl($redirectUrl);
             }
-            return $this->resultForwardFactory->create()->forward('noroute');
-        } catch (\Exception $e) {
-            return $this->resultForwardFactory->create()->forward('noroute');
         }
+
+        return $this->resultRedirectFactory->create()->setUrl($redirectUrl);
     }
 }
diff --git a/Model/ResourceModel/BannerStatistic.php b/Model/ResourceModel/BannerStatistic.php
index 77dfd05..4ec06eb 100755
--- a/Model/ResourceModel/BannerStatistic.php
+++ b/Model/ResourceModel/BannerStatistic.php
@@ -44,9 +44,15 @@ public function incrementDisplayCount($bannerId)
         $row = $connection->fetchRow($select);
 
         if ($row) {
-            $connection->update($this->getMainTable(), array(
-                'display_count' => ++$row['display_count']
-                ), "banner_id = {$bannerId} AND date = '{$todayDate}'"
+            $connection->update(
+                $this->getMainTable(),
+                array(
+                    'display_count' => ++$row['display_count']
+                ),
+                array(
+                    'banner_id = ?' => $bannerId,
+                    'date = ?' => $todayDate
+                )
             );
         } else {
             $connection->insert($this->getMainTable(), array(
@@ -69,9 +75,15 @@ public function incrementClicksCount($bannerId)
 
         $row = $connection->fetchRow($select);
         if ($row) {
-            $connection->update($this->getMainTable(), array(
-                'clicks_count' => ++$row['clicks_count']
-                ), "banner_id = {$bannerId} AND date = '{$todayDate}'"
+            $connection->update(
+                $this->getMainTable(),
+                array(
+                    'clicks_count' => ++$row['clicks_count']
+                ),
+                array(
+                    'banner_id = ?' => $bannerId,
+                    'date = ?' => $todayDate
+                )
             );
         } else {
             $connection->insert($this->getMainTable(), array(
