Revert "Fix wrong memcpy"

This reverts commit 3697187dd7aacba9646d903e89669dcb4f7d2b5d.