diff --git a/bin/epm b/bin/epm
index 7b86557bd64f476dd5a3c2fec8240216090e4116..0518b5c76b7dd0d70d3437b024228063a70c4ec5 100755
--- a/bin/epm
+++ b/bin/epm
@@ -151,9 +151,9 @@ for opt in "$@" ; do
         ;;
     *)
         if [ -f "$opt" ] ; then
-            pkg_files="$pkgfiles $opt"
+            pkg_files="$pkg_files $opt"
         else
-            pkg_names="$pkgnames $opt"
+            pkg_names="$pkg_names $opt"
         fi
         ;;
     esac