Fix manual array copy
Merge pull request #508 from naoliv/pull2

Fix manual array copy