gatherArray fixed for interpreter mode