diff --git a/casetracker_basic.module b/casetracker_basic.module
index 3390dfa..e40e2f9 100644
--- a/casetracker_basic.module
+++ b/casetracker_basic.module
@@ -62,7 +62,7 @@ function casetracker_basic_case_form(&$node) {
 }
 
 /**
- *  Implementation of hook_access().
+ * Implementation of hook_access().
  */
 function casetracker_basic_project_access($op, $node, $account) {
   switch ($op) {
@@ -88,19 +88,19 @@ function casetracker_basic_case_access($op, $node) {
     case 'view':
       // we have to check if the OG module is installed, otherwise this will
       // overule the OG nodeaccess
-      if (!module_exists('og')) {
+      if (module_exists('og')) {
         return user_access('access case tracker');
       }
       // we check if the case isn't created by the current user or is
       // assigned to the current user, if so that user gets access
-      elseif (
-        user_access('access case tracker')
-        && 0 < (int)$user->uid
-        && ((int)$node->casetracker->assign_to === (int)$user->uid
-           || (int)$node->uid === (int)$user->uid)
-      ) {
+      elseif (user_access('access case tracker') && $user->uid > 0 &&
+        ($node->casetracker->assign_to == $user->uid || $node->uid == $user->uid)) {
         return TRUE;
       }
+      else {
+        // Deny access to case
+        return FALSE;
+      }
       break;
     case 'create':
       return user_access('create cases');
