diff --git a/index.php b/index.php
index f3580be3..2996591a 100644
--- a/index.php
+++ b/index.php
@@ -59,7 +59,7 @@ else if(preg_match("/^(.*)\.(gif|jpg|png|jpeg|tiff|bmp|css|js|less|map|html|php|
if(file_exists(BASE . 'config.local.php'))
require_once BASE . 'config.local.php';
-if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['installed']))
+if((!isset($config['installed']) || !$config['installed']) && file_exists(BASE . 'install'))
{
header('Location: ' . BASE_URL . 'install/');
die('Setup detected that install/ directory exists. Please visit this url to start MyAAC Installation.
Delete install/ directory if you already installed MyAAC.
Remember to REFRESH this page when you\'re done!');