Adding rewind to allow image data to be extracted properly