fix array bug on line 1683, rename array vars