diff --git a/hbal.hs b/hbal.hs
index a6060778fc639d4f478cdd252f678170a356dcfe..7424b3d962d46aa35373ea203ca98ba1e62ad793 100644
--- a/hbal.hs
+++ b/hbal.hs
@@ -141,7 +141,12 @@ iterateDepth ini_tbl max_rounds ktn kti nmlen imlen cmd_strs oneline =
 main :: IO ()
 main = do
   cmd_args <- System.getArgs
-  (opts, _) <- CLI.parseOpts cmd_args "hbal" options defaultOptions optShowHelp
+  (opts, args) <- CLI.parseOpts cmd_args "hbal" options
+                  defaultOptions optShowHelp
+
+  unless (null args) $ do
+         hPutStrLn stderr "Error: this program doesn't take any arguments."
+         exitWith $ ExitFailure 1
 
   when (optShowVer opts) $ do
          putStr $ CLI.showVersion "hbal"
diff --git a/hn1.hs b/hn1.hs
index 4140674dff6d49390ebac48d9f8a4be148f0447a..65ab4bb7e30df4c5c6e36b7493b3883e2b18e844 100644
--- a/hn1.hs
+++ b/hn1.hs
@@ -123,7 +123,12 @@ options =
 main :: IO ()
 main = do
   cmd_args <- System.getArgs
-  (opts, _) <- CLI.parseOpts cmd_args "hn1" options defaultOptions optShowHelp
+  (opts, args) <- CLI.parseOpts cmd_args "hn1" options
+                  defaultOptions optShowHelp
+
+  unless (null args) $ do
+         hPutStrLn stderr "Error: this program doesn't take any arguments."
+         exitWith $ ExitFailure 1
 
   when (optShowVer opts) $ do
          printf $ CLI.showVersion "hn1"