fixing adding image bugs