diff --git a/src/Alias.ts b/src/Alias.ts
index 238c531e0..0ccc7c27c 100644
--- a/src/Alias.ts
+++ b/src/Alias.ts
@@ -38,13 +38,14 @@ export function printAliases(): void {
 export function parseAliasDeclaration(dec: string, global = false): boolean {
   const re = /^([\w|!|%|,|@|-]+)=(("(.+)")|('(.+)'))$/;
   const matches = dec.match(re);
-  if (matches == null || matches.length != 3) {
+  if (matches == null || matches.length != 7) {
     return false;
   }
+
   if (global) {
-    addGlobalAlias(matches[1], matches[2]);
+    addGlobalAlias(matches[1], matches[4] || matches[6]);
   } else {
-    addAlias(matches[1], matches[2]);
+    addAlias(matches[1], matches[4] || matches[6]);
   }
   return true;
 }