Fix typo causing last photo to be duplicated in viewer