diff --git a/src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java b/src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
index a2729b7..546ae42 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/batch/BatchSubmitter.java
@@ -138,18 +138,22 @@
     if (dest.changes != null) {
       // TODO: Is using the first change in the batch for each dest the correct thing to do?
       Change firstInDest =
-          notesFactory.createChecked(dest.changes.get(0).toPatchSetId().changeId()).getChange();
+          notesFactory
+              .createChecked(
+                  Project.nameKey(dest.project), dest.changes.get(0).toPatchSetId().changeId())
+              .getChange();
       SubmissionId submissionId = new SubmissionId(firstInDest);
       for (Batch.Change change : dest.changes) {
-        closeChange(change.toPatchSetId(), dest.sha1, submissionId);
+        closeChange(Project.nameKey(dest.project), change.toPatchSetId(), dest.sha1, submissionId);
       }
     }
   }
 
-  private void closeChange(PatchSet.Id psId, String sha1, SubmissionId submissionId)
+  private void closeChange(
+      Project.NameKey destProject, PatchSet.Id psId, String sha1, SubmissionId submissionId)
       throws IOException, RepositoryNotFoundException, RestApiException, UpdateException,
           PermissionBackendException {
-    ChangeNotes changeNotes = notesFactory.createChecked(psId.changeId());
+    ChangeNotes changeNotes = notesFactory.createChecked(destProject, psId.changeId());
     permissionBackend.user(user).change(changeNotes).check(ChangePermission.READ);
     Change change = changeNotes.getChange();
     PatchSet ps = psUtil.get(changeNotes, psId);
diff --git a/src/main/java/com/googlesource/gerrit/plugins/batch/cli/PatchSetArgument.java b/src/main/java/com/googlesource/gerrit/plugins/batch/cli/PatchSetArgument.java
index 78d173a..1142882 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/batch/cli/PatchSetArgument.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/batch/cli/PatchSetArgument.java
@@ -47,7 +47,7 @@
     public PatchSetArgument createForArgument(String token) {
       try {
         PatchSet.Id patchSetId = parsePatchSet(token);
-        ChangeNotes changeNotes = notesFactory.createChecked(patchSetId.changeId());
+        ChangeNotes changeNotes = notesFactory.createCheckedUsingIndexLookup(patchSetId.changeId());
         permissionBackend.user(user).change(changeNotes).check(ChangePermission.READ);
         return new PatchSetArgument(changeNotes.getChange(), psUtil.get(changeNotes, patchSetId));
       } catch (PermissionBackendException | AuthException e) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/batch/ssh/ListCommand.java b/src/main/java/com/googlesource/gerrit/plugins/batch/ssh/ListCommand.java
index 42edd43..2ffaa5b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/batch/ssh/ListCommand.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/batch/ssh/ListCommand.java
@@ -38,8 +38,7 @@
         new CommandRunnable() {
           @Override
           public void run() throws Exception {
-            try (DynamicOptions pluginOptions =
-                new DynamicOptions(ListCommand.this, injector, dynamicBeans)) {
+            try (DynamicOptions pluginOptions = new DynamicOptions(injector, dynamicBeans)) {
               parseCommandLine(impl, pluginOptions);
               impl.display(out);
             }
