fixed a bug that cannot export image/video because of incorrect order