Fixed image bug when editing