Switch from memcpy to memmove for vector