fix insert image bug