swaping image, fixing overwrite