fix compilation

i'm not sure why we have to copy the list, but using the original Array
also does not work, so it's this for now.