Fixed the bug with an empty element in list of photos