fixed litte insert bug, selected images are reset when dialog closes