Fixes error when more than one image was included.