Fixed a bug when saving a fragment with only a photo in it