diff --git a/index.php b/index.php
index 940b62a7..5b5e2992 100644
--- a/index.php
+++ b/index.php
@@ -179,7 +179,7 @@ $twig->addGlobal('config', $config);
$twig->addGlobal('status', $status);
// verify myaac tables exists in database
-if(!tableExist('myaac_account_actions')) {
+if(!$db->hasTable('myaac_account_actions')) {
die('Seems that the table myaac_account_actions of MyAAC doesn\'t exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting this url.');
}