fixed default photo making when one of ratings have photo_id=NULL