fixed bug where old images were not replaced, but new images were added to image list instead