diff --git a/opt/cs50/submit50/bin/submit50.py b/opt/cs50/submit50/bin/submit50.py
index <HASH>..<HASH> 100755
--- a/opt/cs50/submit50/bin/submit50.py
+++ b/opt/cs50/submit50/bin/submit50.py
@@ -186,6 +186,14 @@ def submit(problem):
             config = {"course": course}
             with open(CONFIG_PATH, "w") as f:
                 json.dump(config, f)
+                
+    # course identifier specified at command line, cache it
+    else:
+        with open(CONFIG_PATH, "r") as f:
+            config = json.load(f)
+        config["course"] = course
+        with open(CONFIG_PATH, "w") as f:
+            json.dump(config, f)
     
     # ensure problem exists
     global EXCLUDE
Cache course identifier if provided at command line