backport new changes in array_proj