Minor fix to array building for extend