Index out of matrix dimension

If someone could help me it would be most appreciated. I am trying to process stamps using 6 patches and I can’t get past step 5 despite having plenty of PS. It gives me the following error:

STAMPS: ########################################
STAMPS: ################ Step 5 ################
STAMPS: ########################################
STAMPS: Directory is PATCH_6

PS_CORRECT_PHASE: Starting
Correcting phase for look angle error…
GETPARM: small_baseline_flag=‘n’
PS_CORRECT_PHASE: Finished

STAMPS: Directory is RES

PS_MERGE_PATCHES: Starting
Merging patches…
GETPARM: merge_resample_size=0
GETPARM: merge_standard_dev=Inf
Processing PATCH_1
Processing PATCH_2
Processing PATCH_3
Processing PATCH_4
Processing PATCH_5
Processing PATCH_6
Index out of matrix dimension

error llh2local (line 41)
dlambda=llh(1,z)-origin(1);

error ps_merge_patches (line 485)
xy=llh2local(lonlat’,ll0)*1000;

error stamps (line 474)
ps_merge_patches