Bugfix in add_image