bug about copying array

that was not initialized to 0