fix for OutOfBound exception in copyarray
Merge pull request #207 from menny/master

fix for OutOfBound exception in copyarray - v108