Fixed a bug that prevented adding images.