Removed {i} in figType{i} (line 54) which was causing a crash