Fixed incorrect size of data structure being used in memcpy