fix circular for arrays too