Added check for tables which don't exist in model.php