fixed do_images()