Changed to use memcpy to copy array in storetynd and restoretynd.