diff --git a/medoo.php b/medoo.php
index <HASH>..<HASH> 100644
--- a/medoo.php
+++ b/medoo.php
@@ -589,7 +589,7 @@ class medoo
 						}
 					}
 
-					$table_join[] = $join_array[ $match[2] ] . ' JOIN "' . $match[3] . '" ' . (isset($match[5]) ?  ' AS "' . $match[5] . '"' : '') . $relation;
+					$table_join[] = $join_array[ $match[2] ] . ' JOIN "' . $match[3] . '" ' . (isset($match[5]) ?  'AS "' . $match[5] . '" ' : '') . $relation;
 				}
 			}
[fix] Table joining with alias bug