fix a problem where the frame's data pointer is overwritten by the newly