new_array segmentation fault