BUGFIX Fix segfault in copy array