Fix issue with cloning typed arrays

Closes #624