fix preview image bug