fix buffer bug for memmov