diff --git a/s1process.py b/s1process.py
index ffc26d7ff7fac5fae5ef0fd95108a2919c00c62f..f42e6ea1fbef957f9f066eb9d7cde6701c67fd2c 100644
--- a/s1process.py
+++ b/s1process.py
@@ -733,10 +733,10 @@ def s1process(indir, outdir, epsg=None,
                 sys.exit('Invalid direction parameter.')
 
         if satellite != 'both':
-            safe_files_s1a, safe_files_s1b = separateAscDesc(safe_files)
-            if direction == 's1a':
+            safe_files_s1a, safe_files_s1b = separateS1AS1B(safe_files)
+            if satellite == 's1a':
                 safe_files = safe_files_s1a
-            elif direction == 's1b':
+            elif satellite == 's1b':
                 safe_files = safe_files_s1b
             else:
                 sys.exit('Invalid satellite parameter.')