diff --git a/src/ALL_module_obj.F90 b/src/ALL_module_obj.F90
index 980455911bf3e49b61501df2bf3a4e68259af4eb..0cdb91e8ae307a17fe59839c30f25d6b2d4063cf 100644
--- a/src/ALL_module_obj.F90
+++ b/src/ALL_module_obj.F90
@@ -135,7 +135,7 @@ contains
         ! TODO these nloc and nsize, must always be dim? Which has been set previously!
         !      If the lengths are irrelevant, we may do away with the safety and just bind the C function to
         !      the derived type.
-        call all_set_proc_grid_params_f(this%object, loc, this%dim, ranks, this%dim)
+        call all_set_proc_grid_params_f(this%object, this%dim, loc, this%dim, ranks)
     end subroutine
     subroutine ALL_set_proc_tag(this, tag)
         class(ALL_t), intent(in) :: this