diff --git a/core/pymod/core/pm3argparse.py b/core/pymod/core/pm3argparse.py
index a606c81f10bc99671110aebd83a4131087d85c3f..dd4c981f1d3415e57d9b9aa1e4d09594018d18bb 100644
--- a/core/pymod/core/pm3argparse.py
+++ b/core/pymod/core/pm3argparse.py
@@ -229,6 +229,12 @@ class PM3OptionsNamespace(object):
             helper.MsgErrorAndExit("'--fasta %s' requires " % ' '.join(argstr)+
                                    "one argument prefixed with 'trg:' marking "+
                                    "the target sequence name", 11)
+        # check that 'trg:' has a string attached
+        if not len(trgname):
+            helper.MsgErrorAndExit("'--fasta %s' requires " % ' '.join(argstr)+
+                                   "argument 'trg:' defining the "+
+                                   "target sequence name, empty one "+
+                                   "found: '%s'" % ' '.join(argstr), 14)
         return trgname, seqfile
 
     def _PostProcessAlignment(self):
@@ -242,11 +248,6 @@ class PM3OptionsNamespace(object):
         if self.fasta:
             for src in self.fasta:
                 trgname, seqfile = self._FetchAlnFromFastaOpt(src)
-                if not len(trgname):
-                    helper.MsgErrorAndExit("'--fasta' requires argument "+
-                                           "'trg:' defining the "+
-                                           "target sequence name, empty one "+
-                                           "found: '%s'" % ' '.join(src), 14)
                 helper.FileExists("Alignment", 12, seqfile)
                 is_gz = helper.FileGzip("Alignment", 13, seqfile)
                 readfile = seqfile
diff --git a/core/tests/test_pm3argparse.py b/core/tests/test_pm3argparse.py
index 10ad2777660410d48370132ab598bd7d716faee1..c8c54c5924c72a435fc1ee48a76bb1e5e11037f9 100644
--- a/core/tests/test_pm3argparse.py
+++ b/core/tests/test_pm3argparse.py
@@ -100,9 +100,9 @@ class PM3ArgParseTests(unittest.TestCase):
         with self.assertRaises(SystemExit) as ecd:
             parser.Parse(['--fasta', 'trg:', 'bar'])
         self.assertEqual(ecd.exception.code, 14)
-        self.assertEqual(self.log.messages['ERROR'][0], "'--fasta' requires "+
-                         "argument 'trg:' defining the target sequence name, "+
-                         "empty one found: 'trg: bar'")
+        self.assertEqual(self.log.messages['ERROR'][0], "'--fasta trg: bar' "+
+                         "requires argument 'trg:' defining the target "+
+                         "sequence name, empty one found: 'trg: bar'")
 
     def testAddAlignemntSwapTrgPfx(self):
         # checking that we fail on empty 'trg:' prefix for arguments of
@@ -113,9 +113,9 @@ class PM3ArgParseTests(unittest.TestCase):
         with self.assertRaises(SystemExit) as ecd:
             parser.Parse(['--fasta', 'bar', 'trg:'])
         self.assertEqual(ecd.exception.code, 14)
-        self.assertEqual(self.log.messages['ERROR'][0], "'--fasta' requires "+
-                         "argument 'trg:' defining the target sequence name, "+
-                         "empty one found: 'bar trg:'")
+        self.assertEqual(self.log.messages['ERROR'][0], "'--fasta bar trg:' "+
+                         "requires argument 'trg:' defining the target "+
+                         "sequence name, empty one found: 'bar trg:'")
 
     def testAddAlignmentNoFile(self):
         # check that we throw an error if a non-exisiting file is given