fixed memcpy, forgot )